Skip to content

[BUG] NativeCall semantics not using the state obtained after a call to prepare #370

Description

@pezwastaken

Description
Semantics of NativeCall is computed on the state that doesn't include modifications applied by the call to prepare. The results of this can be seen in the case of Autoboxing for native Java calls.

Around line 220 of NativeCall.java:

Pair<AnalysisState<A>, ExpressionSet[]> prepared = strategy
	.prepare(this, state, interprocedural, expressions, nat.getDescriptor().getFormals(), params);

NaryExpression rewritten = nat.rewrite(this, parameters);
result = result
	.lub(rewritten.forwardSemanticsAux(interprocedural, state, prepared.getRight(), expressions)); // <--

The last line is using state instead of prepared.getLeft(), which would be the analysis state after the prepare call.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

Status
Backlog

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions