summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Fuzzer/test/OutOfMemorySingleLargeMallocTest.cpp
Commit message (Collapse)AuthorAgeFilesLines
* [libFuzzer] Fix OutOfMemory tests to work on 32 bits.Marcos Pividori2017-01-221-1/+1
| | | | | | | | | | | | | | | | | I add 2 changes to make the tests work on 32 bits and on 64 bits. I change the size allocated to 0x20000000 and add the flag: -rss_limit_mb=300. Otherwise the output for 32 bits and 64 bits is different. For 64 bits the value 0xff000000 doesn't exceed kMaxAllowedMallocSize. For 32 bits, kMaxAllowedMallocSize is set to 0xc0000000, so the call to Allocate() will fail earlier printing "WARNING: AddressSanitizer failed to allocate ..." , and wont't call malloc hooks. So, we need to consider a size smaller than 2GB (so malloc doesn't fail on 32bits) and greater that the value provided by -rss_limit_mb. Because of that I use: 0x20000000. Differential Revision: https://reviews.llvm.org/D28706 llvm-svn: 292744
* [libFuzzer] Remove unnecessary includes of posix headers.Marcos Pividori2016-12-161-1/+0
| | | | | | | | | Remove includes of "unistd.h" header, which is missing in non posix systems. Differential Revision: https://reviews.llvm.org/D277300 llvm-svn: 289965
* [libFuzzer] extend -rss_limit_mb to crash instantly on a single malloc that ↵Kostya Serebryany2016-11-301-0/+28
exceeds the limit llvm-svn: 288281
OpenPOWER on IntegriCloud