Commit d7534174 authored by Andreas Haas's avatar Andreas Haas Committed by Commit Bot

[arraybuffer] Disable test on sanitizers

I disabled the ArrayBufferContentsTest.AllocationFail test on ASAN,
because ASAN causes a crash when allocation fails. Note that allocation
is meant to fail in this test, and we want to check if the
implementation can deal with a failed allocation. However, ASAN
escalates the failed allocation to a crash.

R=haraken@chromium.org, huangs@chromium.org

Bug: chromium:1038741
Change-Id: I89c7138eb9b636cfd5ce6eae95bdfcf7dd7871cc
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1985953
Commit-Queue: Andreas Haas <ahaas@chromium.org>
Reviewed-by: default avatarKentaro Hara <haraken@chromium.org>
Reviewed-by: default avatarSamuel Huang <huangs@chromium.org>
Cr-Commit-Position: refs/heads/master@{#730158}
parent 57510d1c
...@@ -10,7 +10,15 @@ namespace blink { ...@@ -10,7 +10,15 @@ namespace blink {
class ArrayBufferContentsTest : public testing::Test {}; class ArrayBufferContentsTest : public testing::Test {};
TEST_F(ArrayBufferContentsTest, AllocationFail) { #if defined(ADDRESS_SANITIZER)
#define DISABLE_ON_ASAN(test_name) DISABLED_##test_name
#else
#define DISABLE_ON_ASAN(test_name) test_name
#endif // defined(ADDRESS_SANITIZER)
// Disable on ASAN to avoid crashing on failed allocations, see
// https://crbug.com/1038741.
TEST_F(ArrayBufferContentsTest, DISABLE_ON_ASAN(AllocationFail)) {
// This should be an amount of memory that cannot be allocated. // This should be an amount of memory that cannot be allocated.
size_t length = sizeof(size_t) == 4 ? 0x4fffffff : 0x8000000000; size_t length = sizeof(size_t) == 4 ? 0x4fffffff : 0x8000000000;
size_t element_byte_size = 1; size_t element_byte_size = 1;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment