[PATCH] D34243: [Sanitizers] Secondary allocator respects allocator_may_return_null=1.

Evgenii Stepanov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 15 16:03:56 PDT 2017


eugenis added inline comments.


================
Comment at: test/asan/TestCases/Linux/allocator_oom_test.cc:45
+#if __LP64__
+      (1ULL << 40) - (1ULL << 30);
+#else
----------------
This is fragile, but I don't really see a better way. Maybe add a while (x) loop around the allocation in case one is not enough?

Btw, why does allocating (1<<40) - (1ULL << 30) fail?


https://reviews.llvm.org/D34243





More information about the llvm-commits mailing list