Repository navigation
C call graph: link calls through an object-like #define alias (Part of #7828) - #8364
Conversation
…function it names (Part of #7828) Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
…s calls (Part of #7828) Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
…ks (Part of #7828) Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
|
No description provided. |
|
PR #8364 @ a55fc10: 4 failed check(s) == shard 1 (1670027 LOC) (failure) -- real == shard 2 (1669474 LOC) (failure) -- real == shard 3 (1670389 LOC) (failure) -- real == shard 4 (1669847 LOC) (failure) -- real |
…s as macro expansions; bless goldens (Part of #7828) The alias links added 231 engine-only edges in chocolate-doom etc. that the oracle scored as false. The oracle now reads `#define NAME TARGET` (vendored headers too, union over #if variants) as an expansion. Alias edges move into callgraph_unscored; srb2 keeps 3 engine-only edges through bodies tree-sitter closes early, listed in expected_fails. Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
|
CI shepherd: the head of this PR (58e4e31) is not the one a maintainer labelled |
|
No description provided. |
|
No description provided. |
|
PR #8364 @ 58e4e31: 12 failed check(s) == committed ports compile (cancelled) -- infra == crucible (cancelled) -- infra == db2 (cancelled) -- infra == db2 ${{ matrix.shard }} (cancelled) -- infra == ground-truth (cancelled) -- infra == ground-truth part ${{ matrix.shard }} (cancelled) -- infra == ground-truth-warm (cancelled) -- infra == measure (shard ${{ matrix.shard }}/${{ matrix.total }}) (cancelled) -- infra == publish-history (cancelled) -- infra == shard ${{ matrix.group }}/${{ needs.plan.outputs.splits }} (cancelled) -- infra == shard ${{ matrix.shard }} (cancelled) -- infra == shard 4 (1669847 LOC) (failure) -- real |
|
PR #8364 @ 58e4e31: 11 failed check(s) == crucible (cancelled) -- infra == db2 (cancelled) -- infra == db2 ${{ matrix.shard }} (cancelled) -- infra == ground-truth (cancelled) -- infra == ground-truth part ${{ matrix.shard }} (cancelled) -- infra == ground-truth-warm (cancelled) -- infra == measure (shard ${{ matrix.shard }}/${{ matrix.total }}) (cancelled) -- infra == publish-history (cancelled) -- infra == shard ${{ matrix.group }}/${{ needs.plan.outputs.splits }} (cancelled) -- infra == shard ${{ matrix.shard }} (cancelled) -- infra == shard 4 (1669847 LOC) (failure) -- real |
|
No description provided. |
|
No description provided. |
|
PR #8364 @ f5861ce: 11 failed check(s) == db2 (cancelled) -- infra == full-suite (cancelled) -- infra == full-suite part ${{ matrix.group }}/${{ needs.shard-plan.outputs.splits }} (cancelled) -- infra == ground-truth (cancelled) -- infra == ground-truth part ${{ matrix.shard }} (cancelled) -- infra == ground-truth-warm (cancelled) -- infra == measure (shard ${{ matrix.shard }}/${{ matrix.total }}) (cancelled) -- infra == publish-history (cancelled) -- infra == shard ${{ matrix.group }}/${{ needs.plan.outputs.splits }} (cancelled) -- infra == store the suite's durations (cancelled) -- infra == suite time budget (#5166) (cancelled) -- infra |
…631Z # Conflicts: # tests/golden_master_audit/12_scan_output_snapshots/llm_brief.json # tests/golden_master_zero_dep_audit/12_scan_output_snapshots/llm_brief.json
…+1 C call pair (Part of #7828) Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
CI shepherd: the head of this PR (b86b126) is not the one a maintainer labelled |
|
No description provided. |
1 similar comment
|
No description provided. |
|
No description provided. |
Part of #7828
What
In C/C++/Objective-C a call written through an object-like
#define NAME TARGETalias (curl'sfailf->Curl_failf,infof->Curl_infof) now getsTARGETin the unit'scalls_out_to, as the compiler's expansion gives it. It reuses the #6770 macro-body table and its bounded expansion:c_macro_alias_targetsreads the alias defines,c_repo_macro_body_callskeeps a target only when the scan declares it as a function (or it is a macro already in the table, for chains), and unions the targets of every#ifvariant (the engine does not evaluate#if). A same-named function-like macro (curl'sinfof(...) Curl_nop_stmt) keeps its calls and gains the alias target; a non-function target (Curl_nop_stmt) is dropped.Class
Class: an object-like C macro whose whole body is one identifier (parentheses and a trailing comment allowed) naming a repo-declared function or a macro that calls.
Siblings fixed here: alias chains,
#ifvariants (union), parenthesised(Func)alias, same-named function-like no-op variants, C++/Objective-C lanes (shared_UNSET_TOGGLE_LANGS).Sibling gaps (no burned-estate program needs them; frontier): function-like macros whose bodies #6770 does not reach (openssl
ERR_raise/OPENSSL_free, ~17k edges per the #7828 comment), token-pasted definitions (caller_unmapped, ~8.8k edges, out of scope in the issue).Evidence
curl 7_30_0
lib/:Curl_failfcallers 3 -> 229 functions,Curl_infof1 -> 191; 226 and 190 confidentimport-step links infcall_data.call_graph_resolution.py c(libclang 18.1.1, language-crucible set): confident judged 6724 -> 6756, precision 100.0% before and after (0 wrong), recall 50.6% -> 50.8%, resolution recall 55.2% -> 55.3%; baseline regenerated.Golden drift (both fixtures): only
calls_out_to,fan_in,fan_out,pagerank, graph SQLite and the LLM brief snapshot moved, because more calls resolve (e.g. racketeval.c). Blessed withgolden-lock.sh crucible_check.py --update --yes.Tests
tests/core_engine/test_macro_body_calls_6770.py: alias table cases (same/other header, parenthesised, comment,#ifladder, chain, guardedinfof) and guards (value, variable, undeclared, self, keyword, two-token body, continued body), plus the expansion check.audit_check.pyall clear.Lessons for agents
call_graph_resolution.py cneeds libclang 18.1.1 absent from the selfscan venv:pip install --target /tmp/.../libclang libclang==18.1.1and put it on PYTHONPATH.Cross-repo: none (engine only; the language-crucible pin is unchanged).
🤖 Generated with Claude Code