Whatever I had before renaming.
This commit is contained in:
@@ -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,
|
||||
|
||||
@@ -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.";
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user