You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
c/cpp: KNOWN-MACRO SHIELD excludes real functions when the same name is later redefined as a no-op macro (#ifdef debug-fn / #else stub idiom) #2240
bugUnintended behavior or logic failure in the enginecore-engineModifications to the central physics and parsing enginethreat: false-negativeAccuracy tuning: Engine missed a bypass or vulnerability
Root cause:gitgalaxy/core/detector.py's "KNOWN-MACRO SHIELD" (known_macro_names, built around line 2837 via re.finditer(r"^[ \t]*#[ \t]*define[ \t]+([A-Za-z_]\w*)\(", code, re.M), applied around line 3693 as if name in known_macro_names: continue) collects every #define NAME( in the whole file with no positional awareness — it doesn't check whether the #define comes before or after a real function definition of the same name. CPython's common debug-build idiom trips it:
The shield was written to stop a function-like macro invocation elsewhere in the file (e.g. OPCODE(m_op) { case m_op: }) from being misread as a definition, but it has no way to distinguish that from a real prior definition whose name happens to be redefined as a stub later.
Suggested fix: only apply the shield when the candidate match is itself shaped like a bare invocation (no preceding storage-class/return-type tokens), not a full static/inline ... name(...) { signature — or check that the #define doesn't sit inside the same conditional-compilation branch as the definition it's about to exclude.
bugUnintended behavior or logic failure in the enginecore-engineModifications to the central physics and parsing enginethreat: false-negativeAccuracy tuning: Engine missed a bypass or vulnerability
Activity
docs: full tri-comparison ledger sweep -- 49 shapes resolved, 0 unval…
fix(typescript): recognize negation-body arrows, optional method sign…
fix(ruby): scope block-parameter args fallback to define_method's own…