Whatever I had before renaming.

This commit is contained in:
Peter Goodman
2017-11-01 12:14:22 -04:00
parent a46e06b03b
commit f7f029965b
2 changed files with 12 additions and 3 deletions
+2 -1
View File
@@ -268,7 +268,8 @@ def main():
use_sim_procedures=True,
translation_cache=True,
support_selfmodifying_code=False,
auto_load_libs=True)
auto_load_libs=True,
exclude_sim_procedures_list=['printf', 'fprintf'])
entry_state = project.factory.entry_state(
add_options={angr.options.ZERO_FILL_UNCONSTRAINED_MEMORY,
+10 -2
View File
@@ -16,16 +16,24 @@
#include <mctest/McUnit.hpp>
MCTEST_NOINLINE int ident1(int x) {
return x;
}
MCTEST_NOINLINE int ident2(int x) {
return x;
}
TEST(BoundsCheck, YIsAlwaysPositive) {
int x = McTest_IntInRange(-10, 10);
int y = x * x;
int y = ident1(x) * ident2(x);
ASSERT_GE(y, 0)
<< "Found y=" << y << " was not always positive.";
}
TEST(BoundsCheck, YIsAlwaysPositive_CanFail) {
int x = McTest_Int();
int y = x * x; // Can overflow!
int y = ident1(x) * ident2(x); // Can overflow!
ASSERT_GE(y, 0)
<< "Found y=" << y << " was not always positive.";
}