-
Notifications
You must be signed in to change notification settings - Fork 170
Undefined behavior overlooked in a couple of array programs in PR #835 #1173
Comments
Could you please provide a concrete test case (i.e., values for nondet variables) that shows the overflow and explain where it happens? @avritichauhan Could you then please suggest fixes? |
For For array-cav19/array_tiling_tcpy.c, I assume (see below *) the result of There has been some discussion in several issues/PRs (#1105, #1155) on how to fix such problems. One possibility is to do the following:
(*) This is (part of) the llvm generated by clang
Memory |
@hernanponcedeleon Thanks for quickly reverting with the test case :) 👍 @PhilippWendler @avritichauhan In array-cav19/array_tiling_tcpy.c, the result of |
I don't think this is the correct solution since the check can also result in an overflow (when computing |
Oops. Changed it just before commenting from |
Closing the issue as the PR with the fixes is merged. Thanks @avritichauhan @hernanponcedeleon @PhilippWendler |
The files array-cav19/array_tiling_poly6.c and array-cav19/array_tiling_tcpy.c added in the PR #835 have undefined behavior due to integer overflows.
Originally posted by @divyeshunadkat in #835 (comment)
The text was updated successfully, but these errors were encountered: