Skip to content

fix(core, analyzer): Fix method boundary instructions - #407

Merged
Saloed merged 4 commits into
mainfrom
saloed/method-exit-rules
Sep 30, 2026
Merged

Saloed merged 4 commits into
mainfrom
saloed/method-exit-rules

Conversation

@Saloed

@Saloed Saloed commented Sep 30, 2026

Copy link
Copy Markdown
Contributor

No description provided.

Saloed and others added 4 commits September 30, 2026 09:36
JIRLambdaMethod, OpentaintLambdaProxyMethod and SpringGeneratedMethod override
instList with a directly built list and never pass through the JIRInstExtFeature
pipeline, so they had no JMethodEnterInst / JMethodExitNormalInst /
JMethodExitExceptionalInst. Their instList now applies
JMethodBoundaryInstFeature.transformInstList lazily, and the JVM analysis fails
fast when a non-empty method reaches it without boundary instructions.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Method-exit source and sink rules now run on JMethodExitNormalInst /
JMethodExitExceptionalInst (method result Return / Exception); return and
throw are plain transfers to Return / Exception. Facts unchanged by the exit
rules keep the condition-reader refinement. Consumers follow:
- the sequent precondition applies exit sources on the boundaries and answers
  the queried fact with Unchanged plus exit-source preconditions;
- the forward trace resolver records the method-end successor for a trace
  starting on an exit boundary (VulnerabilityChecker final node);
- SARIF resolves an exit boundary location like a generated location: the last
  return/throw of the first relevant flow, else the method's last one;
- isTraceRequiredInstruction also keeps JMethodExitNormalInst.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
The sequent flow function and precondition list JMethodExitNormalInst and
JMethodExitExceptionalInst as explicit when branches instead of routing
them through an else clause, and the precondition dispatch is a single when.
The methodExitBase helper is no longer needed and is removed.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Exit boundary instructions have no local operands, so possible aliases at
them are always empty. Exit sources are evaluated only by the exit
precondition, which makes the applyExitSourceRules flag constant and it is
removed.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@Saloed

Saloed commented Sep 30, 2026

Copy link
Copy Markdown
Contributor Author

@Saloed
Saloed merged commit dcfaad6 into main Sep 30, 2026
6 checks passed
@Saloed
Saloed deleted the saloed/method-exit-rules branch September 30, 2026 11:11
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