Skip to content

Commit

Permalink
Merge pull request #321 from GaloisInc/vr/fix-lhsty-bug
Browse files Browse the repository at this point in the history
fix pattern-matching binding bug
  • Loading branch information
Ptival authored Oct 18, 2024
2 parents bfd2266 + ff2b0e7 commit 359da26
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Reopt/CFG/LLVM.hs
Original file line number Diff line number Diff line change
Expand Up @@ -985,11 +985,11 @@ appToLLVM lhs app = bbArchConstraints $ do
case (typeOfResult, tx, ty) of
(_, Just (FPtrTy _), Just (FPtrTy _)) ->
error "Inferred a pointer type for both addends, this suggests a bug in the constraint generation/solving!"
(Just (FPtrTy lhsty), Just FPtrTy{}, Just FNumTy{})
(Just lhsty@(FPtrTy _), Just FPtrTy{}, Just FNumTy{})
| FnAssignedValue FnAssignment{fnAssignRhs = FnAddrWidthConstant o} <- y ->
bvAddPtrOffset (tyToLLVMType ptrWidth lhsty) x o
| otherwise -> bvAddPtrSymbolic (tyToLLVMType ptrWidth lhsty) x y
(Just (FPtrTy lhsty), Just FNumTy{}, Just FPtrTy{})
(Just lhsty@(FPtrTy _), Just FNumTy{}, Just FPtrTy{})
| FnAssignedValue FnAssignment{fnAssignRhs = FnAddrWidthConstant o} <- x ->
bvAddPtrOffset (tyToLLVMType ptrWidth lhsty) y o
| otherwise -> bvAddPtrSymbolic (tyToLLVMType ptrWidth lhsty) y x
Expand Down

0 comments on commit 359da26

Please sign in to comment.