Quuxplusone / LLVMBugzillaTest

0 stars 0 forks source link

SanitizerCommon.SizeClassAllocator32Iteration FAIL on Solaris/sparcv9 #47171

Open Quuxplusone opened 3 years ago

Quuxplusone commented 3 years ago
Bugzilla Link PR48202
Status NEW
Importance P normal
Reported by Rainer Orth (ro@gcc.gnu.org)
Reported on 2020-11-17 05:11:32 -0800
Last modified on 2020-11-17 05:16:13 -0800
Version unspecified
Hardware Sun Solaris
CC llvm-bugs@lists.llvm.org, vitalybuka@google.com
Fixed by commit(s)
Attachments
Blocks
Blocked by
See also
With sanitizer_common testing enabled on Solaris/sparcv9, two tests FAIL:

  SanitizerCommon-Unit :: ./Sanitizer-sparcv9-Test/SanitizerCommon.SizeClassAllocator32Iteration

/vol/llvm/src/llvm-project/local/compiler-
rt/lib/sanitizer_common/tests/sanitizer_allocator_test.cpp:920: Failure
Expected: (reported_chunks.find(reinterpret_cast<uptr>(allocated[i]))) !=
(reported_chunks.end()), actual: 8-byte object <FF-FF FF-FF 7F-FF 18-A8> vs 8-
byte object <FF-FF FF-FF 7F-FF 18-A8>

  SanitizerCommon-Unit :: ./Sanitizer-sparcv9-Test/SanitizerCommon.CombinedAllocator32Compact

/vol/llvm/src/llvm-project/local/compiler-
rt/lib/sanitizer_common/tests/sanitizer_allocator_test.cpp:665: Failure
Expected: (reported_chunks.find(allocated_ptr)) != (reported_chunks.end()),
actual: 8-byte object <FF-FF FF-FF 7F-FE FA-08> vs 8-byte object <FF-FF FF-FF
7F-FE FA-08>

I've made absolutely no progress understanding what's going on, even after
enabling the tests in a Debug build.  However, I do notice
SANITIZER_MMAP_RANGE_SIZE in sanitizer_platform.h: the value used there is
wrong:
Solaris/sparcv9 uses the full 64-bit address space:

https://docs.oracle.com/cd/E37838_01/html/E66175/advanced-2.html#SSFDGadvanced-5

but changing the definititon to

#define SANITIZER_MMAP_RANGE_SIZE FIRST_32_SECOND_64(1ULL << 32, 1ULL << 64)

obviously doesn't even compile.  Even reducing it to 1ULL << 63 for a test
causes large numbers of tests to FAIL: Solaris doesn't allocate lazily, but
requires VM to be backed by swap, which created OOM conditions all along the
way.

I have a patch to just disable those two tests.
Quuxplusone commented 3 years ago

Patch submitted: https://reviews.llvm.org/D91622.