You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
C call graph: calls through a #define alias (failf -> Curl_failf) are not linked #7828
What's wrong. In C, a call written through an object-like macro alias isn't linked to the function it names. curl 7.30.0 has #define failf Curl_failf at lib/sendf.h:48 (infof likewise). Calls written failf(data, ...) aren't linked to Curl_failf: lib/ftp.c has 43 such sites, imap.c 19, url.c 18, smtp.c 16, and so on. libclang resolves them through the macro. They make up most of the 293 not_extracted/other edges callgraph_triage reports for that snapshot, where call recall vs libclang 18.1.1 is 65.4%. Precision is unaffected: 0 wrong confident links.
Repro. Run tests/tools/callgraph_triage.py c with corpus_repos pointed at a curl-7_30_0 checkout, then read the not_extracted/other samples, e.g. lib/connect.c:1103 failf(data, "Connection time-out");.
Suggested fix shape. In C, an object-like macro whose whole body is one identifier naming a function defined in the repository is an alias: resolve a call to the macro as a call to that function. A guarded alias (curl's infof also has Curl_nop_stmt / (void) variants under #if) links from the branch that names a function. If the engine doesn't evaluate #if, it links to every branch's function target.
Impact. Under-counted call edges, so function fan-in, function PageRank and cross-file fcall edges are low for logging/error helpers in older C code bases that alias them. Modern curl calls Curl_failf directly, and its recall is 86.4%.
How it was found. The same temporal-crucible validation as #7827 (the include issue): gitgalaxy's own call_graph_resolution._score and callgraph_triage, run with the libclang reference on curl and nDPI snapshots. Write-up: squid-protocol/temporal-crucible branch validate/engine-c, docs/engine_validation.md.
Scale on openssl 3.5.0: the function-like form of this is the biggest C call-recall gap measured.
callgraph_triage against libclang 18.1.1 finds 81,816 reference edges, 45,733 of them linked (55.9%; precision unaffected, 1 wrong link). The largest miss bucket is not_extracted/other at 17,087 edges. The leading call token on those lines:
macro
sites
expands to
ERR_raise
6,966
ERR_raise_data(...), then (ERR_new(), ERR_set_debug(...), ERR_set_error) (include/openssl/err.h.in:390)
So the alias in this issue (#define failf Curl_failf) is the simple, object-like case. The same fix shape covers function-like macros: when a function-like macro's body is a call (or comma-list of calls) to repository functions, a call to the macro links to those functions. libclang counts them because it expands macros, so the cost to engine recall is large on macro-heavy C.
Separate, and likely out of scope: about 8,800 caller_unmapped edges are functions that exist only after preprocessing. Examples are token-pasted definitions such as static int is_ ## type ## _fetchable(...) (apps/list.c:40) and generator macros such as DEFINE_OSSL_CMP_CTX_get0_NAME(trusted, trusted, X509_STORE) (crypto/cmp/cmp_ctx.c:38). Text-based extractors, tree-sitter and ctags included, can't see those. I'm recording it here for scale, not as part of the fix.
Claimed by promoter-bot host melek, lease renewed 2026-11-12T22:18Z. It lapses after 6 h without a renewal. To take it back, assign someone or remove the claim:melek label.
Closing: object-like aliases (#8364, curl failf -> Curl_failf, #if variants unioned) and the function-like #if-variant case (#8377) are merged; the C call-graph baseline moved (recall 50.8 -> 51.0%, precision 100%). Remaining sibling gaps (.h.in template headers, cross-file differing macros) are recorded in #8377's body and are not part of this issue's acceptance.
Activity
squid-protocol commentedon Nov 5, 2026
Scale on openssl 3.5.0: the function-like form of this is the biggest C call-recall gap measured.
callgraph_triageagainst libclang 18.1.1 finds 81,816 reference edges, 45,733 of them linked (55.9%; precision unaffected, 1 wrong link). The largest miss bucket isnot_extracted/otherat 17,087 edges. The leading call token on those lines:ERR_raiseERR_raise_data(...), then(ERR_new(), ERR_set_debug(...), ERR_set_error)(include/openssl/err.h.in:390)OPENSSL_freeCRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)(crypto.h.in:115)OPENSSL_malloc/_zalloc/_clear_free/_strdup/_reallocCRYPTO_*ERR_raise_dataSo the alias in this issue (
#define failf Curl_failf) is the simple, object-like case. The same fix shape covers function-like macros: when a function-like macro's body is a call (or comma-list of calls) to repository functions, a call to the macro links to those functions. libclang counts them because it expands macros, so the cost to engine recall is large on macro-heavy C.Separate, and likely out of scope: about 8,800
caller_unmappededges are functions that exist only after preprocessing. Examples are token-pasted definitions such asstatic int is_ ## type ## _fetchable(...)(apps/list.c:40) and generator macros such asDEFINE_OSSL_CMP_CTX_get0_NAME(trusted, trusted, X509_STORE)(crypto/cmp/cmp_ctx.c:38). Text-based extractors, tree-sitter and ctags included, can't see those. I'm recording it here for scale, not as part of the fix.🤖 Generated with Claude Code
squid-protocol commentedon Nov 12, 2026
Claimed by promoter-bot host
melek, lease renewed 2026-11-12T22:18Z. It lapses after 6 h without a renewal. To take it back, assign someone or remove theclaim:meleklabel.C call graph: an alias also adds to a same-named function-like macro'…
Bless goldens and C call-graph baseline for the object-like alias lin…
DOOM-rosetta: the call-graph oracle counts object-like #define aliase…
DOOM-rosetta: re-bless srb2 under CI's pinned tree-sitter (1.22.1); d…
Golden re-bless after merging main: llm_brief keeps the alias link's …
C call graph: link calls through an object-like #define alias (Part of …
Bless goldens, C call-graph baseline and DOOM-rosetta for the #if-var…
C call graph: union a macro's #if variants only when every variant ca…
DOOM-rosetta call-graph baseline: re-baseline for the #if-variant uni…
DOOM-rosetta call-graph baseline: linuxdoom and doomgeneric clang num…
C call graph: a function-like macro's #if variants call the union of …
squid-protocol commentedon Nov 12, 2026
Closing: object-like aliases (#8364, curl
failf->Curl_failf, #if variants unioned) and the function-like #if-variant case (#8377) are merged; the C call-graph baseline moved (recall 50.8 -> 51.0%, precision 100%). Remaining sibling gaps (.h.intemplate headers, cross-file differing macros) are recorded in #8377's body and are not part of this issue's acceptance.