Skip to content

Calls: prefix -- is not a comment; Java synchronized/try() and C# comparison calls are not units (Part of #5633) - #5686

Merged
squid-protocol merged 1 commit into
mainfrom
churn/5633-20261020T0002Z
Oct 20, 2026
Merged

squid-protocol merged 1 commit into
mainfrom
churn/5633-20261020T0002Z

Conversation

@squid-protocol

Copy link
Copy Markdown
Owner

Part of #5633 (all three shapes; sibling gaps below).

Root causes

  1. Prefix -- (C --x[f()], Java for(;;--i, x.f())): detector._apply_literal_shield treated -- as a line-comment marker in every language except a few, so --v; R(); blanked the rest of the line. Fix: _DECREMENT_OPERATOR_LANGS (//-comment languages with a -- operator) use #|// only.
  2. Java synchronized (X.class) {: the bare-name branch of func_start (name(...) {) matched synchronized (...) { (and try (R r = ...) {) as a method, splitting the block off the enclosing method. Trigger is synchronized itself (not .class, not the try/catch). Fix: both name lookaheads in java.py exclude synchronized|try.
  3. managed-doom PathTraversal.cs:71: not a call-regex bug. The multi-line if (a > Fixed.FromInt(16) || ...) matched C# func_start Branch B as <type tokens> Fixed.FromInt(, because the return-type token loop accepted a lone >/< (a comparison operator). The phantom unit Fixed.FromInt took the rest of AddLineIntercepts, including line 71. Fix: a token cannot start with </> + whitespace (csharp.py, both loops).

Class table

Member Status
C/C++ -- before a call fixed
Java/Kotlin/C#/JS/TS/PHP/Groovy/Go/Swift/Dart/ObjC/Apex/Solidity/GLSL/ZScript -- fixed (shared set; tests cover c, cpp, java, kotlin, csharp, javascript, typescript, groovy, php)
Java synchronized (..) {, try (..) { as unit fixed
C# lone >/< in return-type run fixed

Evidence

  • Rescanned with this branch, callcheck.py chocolate-doom: misses 3 -> 0 (p_acs.c:1389/1395/1401), engine calls 12129 -> 12132, precision 1.000.
  • callcheck_jvm.py: mochadoom misses 8 -> 0 (Engine.java:147 getEngine, :42 main, Blocks.java:126), functions 3744 -> 3741 (phantom synchronized units gone); managed-doom miss 1 -> 0, functions 1301 -> 1300 (phantom Fixed.FromInt). kocoa-doom, helion and dsda-doom not rescanned.
  • Tests: tests/extraction/languages/test_calls_out_decrement_sync_5633.py (51 cases; 46 fail without the fix). Extraction suites for the touched languages + test_source_reads: 4330 passed.
  • crucible_check.py (both legs): PASS, zero drift, no re-bless. pr_gates --fast: 6/6. --ratchets not run.

Sibling gaps

  • C# lone * token (a * F(x) could match like >): not reproduced, left (int * F() unsafe return types); none needed by a burned estate.
  • Other languages' shields where -- is not a comment but is not in the set (perl, rust has none): not checked.
  • dsda-doom's 3 -- cases not rescanned (same mechanism as chocolate-doom).

🤖 Generated with Claude Code

… C# comparison calls are not units (Part of #5633)

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 00:17
@github-actions

Copy link
Copy Markdown
Contributor

🐦‍⬛ Muninn Security Scan

✅ No security issues found.

🐦‍⬛ Powered by Muninn · Skald Lab

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant