Skip to content
This repository has been archived by the owner on Aug 2, 2022. It is now read-only.

Commit

Permalink
Merge pull request #3569 from EOSIO/more_fuzz
Browse files Browse the repository at this point in the history
Add a few more fuzz tests that are known to trip up plain wavm
  • Loading branch information
spoonincode authored May 30, 2018
2 parents e64fdeb + 804f089 commit ca03c3a
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 0 deletions.
Binary file added unittests/contracts/fuzz13.wasm
Binary file not shown.
Binary file added unittests/contracts/fuzz14.wasm
Binary file not shown.
Binary file added unittests/contracts/fuzz15.wasm
Binary file not shown.
15 changes: 15 additions & 0 deletions unittests/wasm_tests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1570,6 +1570,9 @@ INCBIN(fuzz9, "fuzz9.wasm");
INCBIN(fuzz10, "fuzz10.wasm");
INCBIN(fuzz11, "fuzz11.wasm");
INCBIN(fuzz12, "fuzz12.wasm");
INCBIN(fuzz13, "fuzz13.wasm");
INCBIN(fuzz14, "fuzz14.wasm");
INCBIN(fuzz15, "fuzz15.wasm");
//INCBIN(fuzz13, "fuzz13.wasm");
INCBIN(big_allocation, "big_allocation.wasm");
INCBIN(crash_section_size_too_big, "crash_section_size_too_big.wasm");
Expand Down Expand Up @@ -1637,6 +1640,18 @@ BOOST_FIXTURE_TEST_CASE( fuzz, TESTER ) try {
vector<uint8_t> wasm(gfuzz12Data, gfuzz12Data + gfuzz12Size);
BOOST_CHECK_THROW(set_code(N(fuzzy), wasm), fc::exception);
}
{
vector<uint8_t> wasm(gfuzz13Data, gfuzz13Data + gfuzz13Size);
BOOST_CHECK_THROW(set_code(N(fuzzy), wasm), fc::exception);
}
{
vector<uint8_t> wasm(gfuzz14Data, gfuzz14Data + gfuzz14Size);
BOOST_CHECK_THROW(set_code(N(fuzzy), wasm), fc::exception);
}
{
vector<uint8_t> wasm(gfuzz15Data, gfuzz15Data + gfuzz15Size);
BOOST_CHECK_THROW(set_code(N(fuzzy), wasm), fc::exception);
}
/* TODO: update wasm to have apply(...) then call, claim is that this
* takes 1.6 seconds under wavm...
{
Expand Down

0 comments on commit ca03c3a

Please sign in to comment.