llvm.org GIT mirror llvm / d0c8980
[libFuzzer] treat -rss_limit_mb=0 as no limit git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288389 91177308-0d34-0410-b5e6-96231b3b80d8 Kostya Serebryany 3 years ago
1 changed file(s) with 1 addition(s) and 1 deletion(s). Raw diff Collapse all Expand all
157157
158158 // Crash on a single malloc that exceeds the rss limit.
159159 void Fuzzer::HandleMalloc(size_t Size) {
160 if ((Size >> 20) < (size_t)Options.RssLimitMb)
160 if (!Options.RssLimitMb || (Size >> 20) < (size_t)Options.RssLimitMb)
161161 return;
162162 Printf("==%d== ERROR: libFuzzer: out-of-memory (malloc(%zd))\n", GetPid(),
163163 Size);