diff --git a/libc/test/UnitTest/HermeticTestUtils.cpp b/libc/test/UnitTest/HermeticTestUtils.cpp --- a/libc/test/UnitTest/HermeticTestUtils.cpp +++ b/libc/test/UnitTest/HermeticTestUtils.cpp @@ -61,7 +61,11 @@ // This is needed if the test was compiled with '-fno-use-cxa-atexit'. int atexit(void (*func)(void)) { return __llvm_libc::atexit(func); } +constexpr uint64_t ALIGNMENT = alignof(uintptr_t); + void *malloc(size_t s) { + // Keep the bump pointer aligned on an eight byte boundary. + s = ((s + ALIGNMENT - 1) / ALIGNMENT) * ALIGNMENT; void *mem = ptr; ptr += s; return mem; diff --git a/libc/test/src/__support/CMakeLists.txt b/libc/test/src/__support/CMakeLists.txt --- a/libc/test/src/__support/CMakeLists.txt +++ b/libc/test/src/__support/CMakeLists.txt @@ -1,17 +1,14 @@ add_custom_target(libc-support-tests) -# This test fails with a misaigned address on NVPTX. -if(NOT LIBC_GPU_TARGET_ARCHITECTURE_IS_NVPTX) - add_libc_test( - blockstore_test - SUITE - libc-support-tests - SRCS - blockstore_test.cpp - DEPENDS - libc.src.__support.blockstore - ) -endif() +add_libc_test( + blockstore_test + SUITE + libc-support-tests + SRCS + blockstore_test.cpp + DEPENDS + libc.src.__support.blockstore +) add_libc_test( endian_test