Skip to content

Replace validation asserts with real exceptions; name the ld.so ancho…#10

Merged
jzh18 merged 1 commit into
mainfrom
fix/validation-and-constants
Jun 12, 2026
Merged

Replace validation asserts with real exceptions; name the ld.so ancho…#10
jzh18 merged 1 commit into
mainfrom
fix/validation-and-constants

Conversation

@jzh18

@jzh18 jzh18 commented Jun 12, 2026

Copy link
Copy Markdown
Member

No description provided.

…r constants

assert statements vanish under python -O, so they are unreliable for
validating trace logs and external tool results:

- malformed module-log and block-info lines now raise ValueError
  (with the offending line and file in the message)
- FunSeeker failure raises RuntimeError including the tool output
- internal invariants in identify_false_positives and the
  get_potential_leading_call precondition raise RuntimeError; the
  predecessor-window search also gets an explicit j = -1 init,
  fixing a latent NameError when a node first appears at index 0

The hardcoded loader path and 0x56d5 offset in
identify_false_negatives become module constants (_LDSO_PATH,
_LDSO_FIXUP_CALL_OFFSET) with a comment documenting that the
glibc-build coupling is deliberate: on a different ld.so build the
anchor never matches and no false negatives are recovered.
@jzh18 jzh18 merged commit 55f68cb into main Jun 12, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant