C call graph: calls through a #define alias (failf -> Curl_failf) are not linked
Maintainer antworten meist innerhalb von 1 Tag
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Anfängerfreundlichkeit
- 56/100
Rechercherichtung
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.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
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
- Vorherrschende Sprache
- Python
- Sterne
- 57
- Forks
- 11
- Ø Merge
- 1 Std. 42 Min.
- Gemergte PRs (30 T.)
- 966
Entwicklungsumgebung
- Kein Dockerfile und keine Docker-Compose-Datei
- Hat eine Pull-Request-Vorlage
- Beitragsleitfaden lesen
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus squid-protocol/gitgalaxy
-
doc drift: wiki [1]Offendocumentation
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 68/100
squid-protocol/gitgalaxy#8002 ·
Maintainer antworten meist innerhalb von 1 Tag
-
doc drift: skills [2]Offendocumentation
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
squid-protocol/gitgalaxy#8000 ·
Maintainer antworten meist innerhalb von 1 Tag
-
doc drift: tests [1]Offendocumentation
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 82/100
squid-protocol/gitgalaxy#8001 ·
Maintainer antworten meist innerhalb von 1 Tag
-
documentation
Schwierigkeit 1/5 1-3 Stunden Anfängerfreundlichkeit 84/100
squid-protocol/gitgalaxy#7998 ·
Maintainer antworten meist innerhalb von 1 Tag
-
doc drift: skills [1]Offendocumentation
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
squid-protocol/gitgalaxy#7999 ·
Maintainer antworten meist innerhalb von 1 Tag
Alle Issues in squid-protocol/gitgalaxy
Ähnliche Issues
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 84/100
pylint-dev/pylint#11791 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Rasterio granule reads never retry, so one 503 (Service Unavailable) fails the whole requestEvtl. vergeben @chuckwondo hat das heute übernommen. Offen
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 75/100
developmentseed/titiler-cmr#305 ·
Maintainer antworten meist innerhalb von 1 Tag
-
community enhancement
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
Maintainer antworten meist innerhalb von 1 Tag
-
bug
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 86/100
Maintainer antworten meist innerhalb von 1 Tag