C call graph: calls through a #define alias (failf -> Curl_failf) are not linked
Les mainteneurs répondent en général sous 1 jour
Personne n'a encore pris cette issue.
Évaluation
- Difficulté
- 4/5
- Temps estimé
- 3-5 jours
- Accessibilité débutants
- 56/100
Piste de recherche
Start with the C call graph resolution path and the callgraph_triage.py reproducer described in the issue. Inspect how calls and object-like macro definitions are represented, then compare results against the libclang reference on the curl 7.30.0 corpus. Done means calls through function-alias macros link to their function targets, including the described guarded aliases, and call graph recall improves without introducing incorrect confident links.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Description
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.
🤖 Generated with Claude Code
- Langage dominant
- Python
- Étoiles
- 57
- Forks
- 11
- Merge moyen
- 1 h 35 min
- PR mergées (30 j)
- 975
Préparer son environnement
- Aucun Dockerfile ni fichier Docker Compose
- Propose un modèle de pull request
- Lire le guide de contribution
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Autres issues de squid-protocol/gitgalaxy
-
bug
Difficulté 2/5 1-3 heures Accessibilité débutants 76/100
squid-protocol/gitgalaxy#7827 · 1 commentaire ·
Les mainteneurs répondent en général sous 1 jour
-
scope:frontier
Difficulté 5/5 Plus d'une semaine Accessibilité débutants 18/100
squid-protocol/gitgalaxy#7900 ·
Les mainteneurs répondent en général sous 1 jour
-
core-engine scope:infra testing
Difficulté 4/5 3-5 jours Accessibilité débutants 54/100
squid-protocol/gitgalaxy#7863 · 1 commentaire ·
Les mainteneurs répondent en général sous 1 jour
-
enhancement
Difficulté 5/5 Plus d'une semaine Accessibilité débutants 35/100
squid-protocol/gitgalaxy#7834 ·
Les mainteneurs répondent en général sous 1 jour
-
claim:melek scope:core
Difficulté 5/5 Plus d'une semaine Accessibilité débutants 25/100
squid-protocol/gitgalaxy#7709 · 46 commentaires ·
Les mainteneurs répondent en général sous 1 jour
Toutes les issues de squid-protocol/gitgalaxy
Issues similaires
-
Difficulté 2/5 1-3 heures Accessibilité débutants 76/100
hkust-nlp/Toolathlon#101 ·
-
enhancement good first issue
Difficulté 2/5 1-3 heures Accessibilité débutants 78/100
SkyTruth/cerulean-cloud#219 ·
-
area:security priority:low size:small
Difficulté 2/5 1-3 heures Accessibilité débutants 84/100
RonaldHensbergen/composable-data-stack#1217 ·
Les mainteneurs répondent en général sous 1 jour
-
good first issue help wanted
Difficulté 2/5 1-3 heures Accessibilité débutants 88/100
blixvip/BlendClone#27 ·
-
Difficulté 2/5 1-3 heures Accessibilité débutants 74/100