Skip to content

Commit

Permalink
Fix bug that prevented detection of two jvm_field_is on same field.
Browse files Browse the repository at this point in the history
Fixes #937.
  • Loading branch information
Brian Huffman committed Dec 2, 2020
1 parent 58e49fe commit 39ee3cd
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion intTests/test_jvm_setup_errors/test.saw
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ check_fails test "get"
};

print "jvm_field_is with previous jvm_field_is on same field";
KNOWN_FALSE_POSITIVE test "get"
check_fails test "get"
do {
this <- jvm_alloc_object "Test";
val <- jvm_fresh_var "val" java_long;
Expand Down
2 changes: 1 addition & 1 deletion src/SAWScript/Crucible/JVM/Builtins.hs
Original file line number Diff line number Diff line change
Expand Up @@ -932,7 +932,7 @@ jvm_field_is _typed _bic _opt ptr fname val =
let cc = st ^. Setup.csCrucibleContext
let cb = cc ^. jccCodebase
let path = Left fname
if st ^. Setup.csPrePost == PreState && MS.testResolved ptr [] rs
if st ^. Setup.csPrePost == PreState && MS.testResolved ptr [path] rs
then X.throwM $ JVMFieldMultiple ptr fname
else Setup.csResolvedState %= MS.markResolved ptr [path]
let env = MS.csAllocations (st ^. Setup.csMethodSpec)
Expand Down

0 comments on commit 39ee3cd

Please sign in to comment.