Skip to content

ObjC: message sends recorded as calls by selector; @selector is not a call (Part of #5639) - #5689

Merged
squid-protocol merged 2 commits into
mainfrom
churn/5639-20261020T0147Z
Oct 20, 2026
Merged

squid-protocol merged 2 commits into
mainfrom
churn/5639-20261020T0147Z

Conversation

@squid-protocol

Copy link
Copy Markdown
Owner

Part of #5639

What

Objective-C message sends are now recorded as calls, by selector (first keyword for a keyword selector): [self initialize], [mOwner updateParameters:p], nested [[Foo alloc] init], [super awakeFromNib], a send inside a C call's arguments, [arr[i] count], [(Foo *)obj bar:1], [Lookup(x) fetch]. C calls are unchanged.

Decision: @selector(x:) does not count as a call (it names a selector, it does not send). The old : lookahead recorded every label: (@selector(dataReady:), ternary colons, later keywords, case X:) as a call; that is gone, as is @synchronized( / @selector( read as C calls. Receiver is not kept as a qualifier: the objc calls_out stays in the non-qualified family (no receiver capture); noted as a gap below.

Changes (4 hand-written files)

  • languages/objectivec.py: calls_out has two groups (C call | message selector).
  • core/detector.py: a multi-group calls_out takes whichever group matched (3 lines; no other language has >1 group).
  • test_calls_out_objc_messages_5639.py (new): one case per shape plus ReDoS; test_objectivec_strict.py updated for the two-group pattern.

Class table

Shape Status
unary / keyword / multi-line keyword handled
nested [[A b] c], [x[i] y], cast receiver, call receiver (unary only) handled
[super x] handled
send inside C call / C call unchanged handled
@selector, @synchronized not a call (decided)
call receiver with keyword selector [f(x) a:1] gap (unary only, to avoid ) label: false hits)
receiver as qualifier not done

Evidence (doom-study oracle callcheck_all.py, objective-c rows, this branch's scan)

port recall before (issue) recall now
doom-ios 0.53 0.992
chocolate-doom 0.52 1.000
prboom-plus 0.52 1.000
eternity ~0.85 0.989
gzdoom ~0.85 0.892

Remaining misses are unit-extent bugs, not call-pattern ones (see Sibling gaps). Engine-only edges in the oracle are nested ] init sends the oracle's regex cannot see (the engine is right).

Gates: pr_gates --fast 6/6; tree-wide guards pass; golden masters re-blessed (both legs, objective-c sections only: new selectors, dropped selector/makeObjectsPerform label phantoms).

Sibling gaps

  • - (void)m; then { (header ending in ;) gives a 1-line unit: doom-ios UICustomSwitch.m setOn, eternity ELTextFieldDelegate.m controlTextDidChange (extent mechanism).
  • gzdoom i_video.mm in-class inline methods (GetWindow, ...): unit extents/attribution in .mm class bodies.
  • Receiver qualifier for sends; keyword selector after a call receiver.

🤖 Generated with Claude Code

squid-protocol and others added 2 commits October 19, 2026 21:51
… call (Part of #5639)

WIP: golden bless pending.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
@squid-protocol squid-protocol added the shepherd:merge Maintainer: merge when green (auto-merge, squash). Guide: docs/ci.md label Oct 20, 2026
@squid-protocol

Copy link
Copy Markdown
Owner Author

No description provided.

@squid-protocol
squid-protocol marked this pull request as ready for review October 20, 2026 02:24
@github-actions

Copy link
Copy Markdown
Contributor

🐦‍⬛ Muninn Security Scan

✅ No security issues found.

🐦‍⬛ Powered by Muninn · Skald Lab

@squid-protocol
squid-protocol enabled auto-merge (squash) October 20, 2026 02:31
@squid-protocol

Copy link
Copy Markdown
Owner Author

PR #5689 @ 0d1e996: 2 failed check(s)

== Call resolution (Level 2, vs pyan3) (failure) -- real
https://github.com/squid-protocol/gitgalaxy/actions/runs/39358733996/job/118419608122
repro: python tests/tools/pr_gates.py --fast
errors:
2026-10-20 02:26:02,427 [WARNING] [GalaxyScope] ┃ (--fail-on-malware cannot fire). Rule-based threats still run. ┃
2026-10-20 02:26:03,615 [WARNING] [GalaxyScope] ┃ (--fail-on-malware cannot fire). Rule-based threats still run. ┃
2026-10-20 02:26:03,865 [WARNING] [GalaxyScope] ┃ (--fail-on-malware cannot fire). Rule-based threats still run. ┃
2026-10-20 02:26:05,568 [WARNING] [GalaxyScope] ┃ (--fail-on-malware cannot fire). Rule-based threats still run. ┃
2026-10-20 02:26:07,374 [WARNING] [GalaxyScope] ┃ (--fail-on-malware cannot fire). Rule-based threats still run. ┃
2026-10-20 02:26:08,923 [INFO] [pyan.analyzer] New edge added for Use from to Name <Node ???:.AssertionError>
2026-10-20 02:26:08,924 [INFO] [pyan.analyzer] New edge added for Use from to Name <Node ???:
.AssertionError>
2026-10-20 02:26:08,925 [INFO] [pyan.analyzer] New edge added for Use from to Name <Node ???:.AssertionError>
2026-10-20 02:26:08,926 [INFO] [pyan.analyzer] New edge added for Use from to Name <Node ???:
.AssertionError>
2026-10-20 02:26:09,008 [INFO] [pyan.analyzer] New edge added for Use from to Name <Node ???:.AssertionError>
2026-10-20 02:26:09,011 [INFO] [pyan.analyzer] New edge added for Use from to Name <Node ???:
.AssertionError>
2026-10-20 02:26:09,451 [INFO] [pyan.analyzer] New edge added for Use from to Name <Node ???:.AssertionError>
2026-10-20 02:26:09,452 [INFO] [pyan.analyzer] New edge added for Use from to Name <Node ???:
.AssertionError>
2026-10-20 02:26:09,452 [INFO] [pyan.analyzer] New edge added for Use from to Name <Node ???:.AssertionError>
2026-10-20 02:26:09,453 [INFO] [pyan.analyzer] New edge added for Use from to Name <Node ???:
.AssertionError>
2026-10-20 02:26:09,453 [INFO] [pyan.analyzer] New edge added for Use from to Name <Node ???:.AssertionError>
2026-10-20 02:26:09,454 [INFO] [pyan.analyzer] New edge added for Use from to Name <Node ???:
.AssertionError>
2026-10-20 02:26:09,454 [INFO] [pyan.analyzer] New edge added for Use from to Name <Node ???:.AssertionError>
2026-10-20 02:26:09,490 [INFO] [pyan.analyzer] New edge added for Use from to Name <Node ???:
.AssertionError>
2026-10-20 02:26:11,330 [WARNING] [GalaxyScope] ┃ (--fail-on-malware cannot fire). Rule-based threats still run. ┃
2026-10-20 02:26:14,871 [WARNING] [GalaxyScope] ┃ (--fail-on-malware cannot fire). Rule-based threats still run. ┃
2026-10-20 02:26:15,019 [WARNING] [GalaxyScope] ┃ (--fail-on-malware cannot fire). Rule-based threats still run. ┃
2026-10-20 02:26:15,186 [WARNING] [GalaxyScope] ┃ (--fail-on-malware cannot fire). Rule-based threats still run. ┃
2026-10-20 02:26:15,352 [WARNING] [GalaxyScope] ┃ (--fail-on-malware cannot fire). Rule-based threats still run. ┃
2026-10-20 02:26:16,084 [INFO] [pyan.analyzer] New edge added for Use from to Name <Node ???:*.AssertionError>
... 65 more
log tail:
"overload_blind_precision_pct": 99.7
},
"recall_all_kinds_pct": 76.4,
"resolution_recall_pct": 97.7,
"named_pyan_edges": 1748,
"pyan_edges": 3592,
"wrong_examples": [
"fastapi: fastapi/routing.py:app -> fastapi/exceptions.py:45 (pyan3: fastapi/exceptions.py:213)",
"fastapi: tests/test_arbitrary_types.py:test_typeadapter -> tests/test_arbitrary_types.py:20 (pyan3: tests/test_arbitrary_types.py:59)"
],
"external_examples": [],
"reference_version": "2.9.0",
"lang": "python"
}
}
| language | reference | confident precision | ambiguous precision | recall | resolution recall |
|---|---|---|---|---|---|
| python | pyan3 | 99.9% (1829 judged) | 60.0% | 50.9% | 97.7% |
decorator edges (not gated): precision 100.0% (575 judged); recall with decorators 66.9%
reference edges (not gated): precision 99.7% (345 judged); recall, all kinds 76.4%
call_graph_resolution: WARNING -- pyan3 2.9.0 is not the pinned 2.8.1; numbers are not comparable to the baseline
call_graph_resolution: REGRESSION
python: recall_pct 51.7 -> 50.9
##[error]Process completed with exit code 1.
Post job cleanup.
[command]/usr/bin/git version
git version 2.55.0
Temporarily overriding HOME='/home/runner/work/_temp/841c007f-c0a1-4c9c-9b99-4b1c624338a0' before making global git config changes
Adding repository directory to the temporary git global config as a safe directory
[command]/usr/bin/git config --global --add safe.directory /home/runner/work/gitgalaxy/gitgalaxy/gitgalaxy
Removing SSH command configuration
[command]/usr/bin/git config --local --name-only --get-regexp core.sshCommand
[command]/usr/bin/git submodule foreach --recursive sh -c "git config --local --name-only --get-regexp 'core.sshCommand' && git config --local --unset-all 'core.sshCommand' || :"
Removing HTTP extra header
[command]/usr/bin/git config --local --name-only --get-regexp http.https://github.com/.extraheader
[command]/usr/bin/git submodule foreach --recursive sh -c "git config --local --name-only --get-regexp 'http.https://github.com/.extraheader' && git config --local --unset-all 'http.https://github.com/.extraheader' || :"
Removing includeIf entries pointing to credentials config files
[command]/usr/bin/git config --local --name-only --get-regexp ^includeIf.gitdir:
[command]/usr/bin/git submodule foreach --recursive git config --local --show-origin --name-only --get-regexp remote.origin.url
Cleaning up orphan processes

== graph-accuracy-audit (failure) -- real
https://github.com/squid-protocol/gitgalaxy/actions/runs/39358733996/job/118421307949
repro: python tests/tools/pr_gates.py --fast
errors:
##[error]Process completed with exit code 1.
log tail:
Version: 20261012.601
Commit: f3dc54e1fb89da6852db922499a0233137369e1d
Build Date: 2026-10-12T17:48:21Z
Worker ID: {042e5739-9abd-4950-95c8-062115847158}
Region: westus
Cloud: Azure
##[endgroup]
##[group]Operating System
Ubuntu
24.04.5
LTS
##[endgroup]
##[group]Runner Image
Image: ubuntu-24.04
Version: 20261012.334.1
Included Software: https://github.com/actions/runner-images/blob/ubuntu24/20261012.334/images/ubuntu/Ubuntu2404-Readme.md
Image Release: https://github.com/actions/runner-images/releases/tag/ubuntu24%2F20261012.334
##[endgroup]
##[group]GITHUB_TOKEN Permissions
Contents: read
Metadata: read
##[endgroup]
Secret source: Actions
Cache mode: write
Prepare workflow directory
Prepare all required actions
Complete job name: graph-accuracy-audit
##[group]Run echo "gate results: $RESULTS"
echo "gate results: $RESULTS"
for r in $RESULTS; do
[ "$r" = "success" ] || { echo "a gate finished as: $r"; exit 1; }
done
shell: /usr/bin/bash -e {0}
env:
RESULTS: success failure success success success
##[endgroup]
gate results: success failure success success success
a gate finished as: failure
##[error]Process completed with exit code 1.
Cleaning up orphan processes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

shepherd:merge Maintainer: merge when green (auto-merge, squash). Guide: docs/ci.md shepherd:needs-fix Bot: a real failure on this head; see the digest comment. Guide: docs/ci.md

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant