Skip to content

Simplify hot-path size computations in BumpPtrAllocator. #101312

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Aug 1, 2024

Conversation

resistor
Copy link
Collaborator

@resistor resistor requested a review from nikic July 31, 2024 09:39
@llvmbot
Copy link
Member

llvmbot commented Jul 31, 2024

@llvm/pr-subscribers-llvm-support

Author: Owen Anderson (resistor)

Changes

~0.1% instruction count improvements

https://llvm-compile-time-tracker.com/compare.php?from=07d2709a17860a202d91781769a88837e4fb5f2a&to=d5cc47831ecd9f0a2b164b16da67f74b94e9aafc&stat=instructions:u


Full diff: https://github.com/llvm/llvm-project/pull/101312.diff

1 Files Affected:

  • (modified) llvm/include/llvm/Support/Allocator.h (+5-5)
diff --git a/llvm/include/llvm/Support/Allocator.h b/llvm/include/llvm/Support/Allocator.h
index e05f0ec0e8704..d9a4f6599e6bb 100644
--- a/llvm/include/llvm/Support/Allocator.h
+++ b/llvm/include/llvm/Support/Allocator.h
@@ -149,8 +149,7 @@ class BumpPtrAllocatorImpl
     // Keep track of how many bytes we've allocated.
     BytesAllocated += Size;
 
-    size_t Adjustment = offsetToAlignedAddr(CurPtr, Alignment);
-    assert(Adjustment + Size >= Size && "Adjustment + Size must not overflow");
+    char* AlignedPtr = reinterpret_cast<char*>(alignAddr(CurPtr, Alignment));
 
     size_t SizeToAllocate = Size;
 #if LLVM_ADDRESS_SANITIZER_BUILD
@@ -158,12 +157,13 @@ class BumpPtrAllocatorImpl
     SizeToAllocate += RedZoneSize;
 #endif
 
+    char* AllocEndPtr = AlignedPtr + SizeToAllocate;
+
     // Check if we have enough space.
-    if (LLVM_LIKELY(Adjustment + SizeToAllocate <= size_t(End - CurPtr)
+    if (LLVM_LIKELY(AllocEndPtr <= End
                     // We can't return nullptr even for a zero-sized allocation!
                     && CurPtr != nullptr)) {
-      char *AlignedPtr = CurPtr + Adjustment;
-      CurPtr = AlignedPtr + SizeToAllocate;
+      CurPtr = AllocEndPtr;
       // Update the allocation point of this memory block in MemorySanitizer.
       // Without this, MemorySanitizer messages for values originated from here
       // will point to the allocation of the entire slab.

Copy link

github-actions bot commented Jul 31, 2024

✅ With the latest revision this PR passed the C/C++ code formatter.

@@ -149,21 +149,21 @@ class BumpPtrAllocatorImpl
// Keep track of how many bytes we've allocated.
BytesAllocated += Size;

size_t Adjustment = offsetToAlignedAddr(CurPtr, Alignment);
assert(Adjustment + Size >= Size && "Adjustment + Size must not overflow");
char *AlignedPtr = reinterpret_cast<char *>(alignAddr(CurPtr, Alignment));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should keep this as an integer, otherwise the addition below may be UB.

The current code was introduced in 44e2746 by @zmodem. I think it's fine to essentially undo that change, but you should add an explicit check that the AlignedPtr + Size addition does not overflow.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

Copy link
Contributor

@nikic nikic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@resistor resistor merged commit 65c000a into llvm:main Aug 1, 2024
7 checks passed
@llvm-ci
Copy link
Collaborator

llvm-ci commented Aug 1, 2024

LLVM Buildbot has detected a new failure on builder libc-x86_64-debian-fullbuild-dbg-asan running on libc-x86_64-debian-fullbuild while building llvm at step 4 "annotate".

Full details are available at: https://lab.llvm.org/buildbot/#/builders/171/builds/3403

Here is the relevant piece of the build log for the reference:

Step 4 (annotate) failure: 'python ../llvm-zorg/zorg/buildbot/builders/annotated/libc-linux.py ...' (failure)
...
-- Performing Test HAVE_GNU_POSIX_REGEX -- failed to compile
-- Performing Test HAVE_POSIX_REGEX -- success
-- Performing Test HAVE_STEADY_CLOCK -- success
-- Performing Test HAVE_PTHREAD_AFFINITY -- success
-- Configuring done
-- Generating done
-- Build files have been written to: /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-fullbuild-dbg-asan/build
@@@BUILD_STEP build libc@@@
Running: ninja libc
[1/559] Building CXX object lib/Support/CMakeFiles/LLVMSupport.dir/Allocator.cpp.o
FAILED: lib/Support/CMakeFiles/LLVMSupport.dir/Allocator.cpp.o 
/usr/bin/clang++ -DGTEST_HAS_RTTI=0 -D_DEBUG -D_GLIBCXX_ASSERTIONS -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -I/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-fullbuild-dbg-asan/build/lib/Support -I/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-fullbuild-dbg-asan/llvm-project/llvm/lib/Support -I/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-fullbuild-dbg-asan/build/include -I/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-fullbuild-dbg-asan/llvm-project/llvm/include -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time -Werror=unguarded-availability-new -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -pedantic -Wno-long-long -Wc++98-compat-extra-semi -Wimplicit-fallthrough -Wcovered-switch-default -Wno-noexcept-type -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -Wsuggest-override -Wstring-conversion -Wmisleading-indentation -Wctad-maybe-unsupported -fno-omit-frame-pointer -O1 -fsanitize=address -fdiagnostics-color -Werror=global-constructors -g -std=c++17  -fno-exceptions -funwind-tables -fno-rtti -MD -MT lib/Support/CMakeFiles/LLVMSupport.dir/Allocator.cpp.o -MF lib/Support/CMakeFiles/LLVMSupport.dir/Allocator.cpp.o.d -o lib/Support/CMakeFiles/LLVMSupport.dir/Allocator.cpp.o -c /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-fullbuild-dbg-asan/llvm-project/llvm/lib/Support/Allocator.cpp
In file included from /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-fullbuild-dbg-asan/llvm-project/llvm/lib/Support/Allocator.cpp:13:
/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-fullbuild-dbg-asan/llvm-project/llvm/include/llvm/Support/Allocator.h:174:7: error: no matching function for call to '__asan_unpoison_memory_region'
      __asan_unpoison_memory_region(AlignedPtr, Size);
      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/lib/llvm-14/lib/clang/14.0.6/include/sanitizer/asan_interface.h:48:6: note: candidate function not viable: no known conversion from 'uintptr_t' (aka 'unsigned long') to 'const volatile void *' for 1st argument; take the address of the argument with &
void __asan_unpoison_memory_region(void const volatile *addr, size_t size);
     ^
1 error generated.
[2/559] Building CXX object lib/Support/CMakeFiles/LLVMSupport.dir/IntervalMap.cpp.o
FAILED: lib/Support/CMakeFiles/LLVMSupport.dir/IntervalMap.cpp.o 
/usr/bin/clang++ -DGTEST_HAS_RTTI=0 -D_DEBUG -D_GLIBCXX_ASSERTIONS -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -I/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-fullbuild-dbg-asan/build/lib/Support -I/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-fullbuild-dbg-asan/llvm-project/llvm/lib/Support -I/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-fullbuild-dbg-asan/build/include -I/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-fullbuild-dbg-asan/llvm-project/llvm/include -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time -Werror=unguarded-availability-new -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -pedantic -Wno-long-long -Wc++98-compat-extra-semi -Wimplicit-fallthrough -Wcovered-switch-default -Wno-noexcept-type -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -Wsuggest-override -Wstring-conversion -Wmisleading-indentation -Wctad-maybe-unsupported -fno-omit-frame-pointer -O1 -fsanitize=address -fdiagnostics-color -Werror=global-constructors -g -std=c++17  -fno-exceptions -funwind-tables -fno-rtti -MD -MT lib/Support/CMakeFiles/LLVMSupport.dir/IntervalMap.cpp.o -MF lib/Support/CMakeFiles/LLVMSupport.dir/IntervalMap.cpp.o.d -o lib/Support/CMakeFiles/LLVMSupport.dir/IntervalMap.cpp.o -c /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-fullbuild-dbg-asan/llvm-project/llvm/lib/Support/IntervalMap.cpp
In file included from /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-fullbuild-dbg-asan/llvm-project/llvm/lib/Support/IntervalMap.cpp:13:
In file included from /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-fullbuild-dbg-asan/llvm-project/llvm/include/llvm/ADT/IntervalMap.h:109:
/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-fullbuild-dbg-asan/llvm-project/llvm/include/llvm/Support/Allocator.h:174:7: error: no matching function for call to '__asan_unpoison_memory_region'
      __asan_unpoison_memory_region(AlignedPtr, Size);
      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/lib/llvm-14/lib/clang/14.0.6/include/sanitizer/asan_interface.h:48:6: note: candidate function not viable: no known conversion from 'uintptr_t' (aka 'unsigned long') to 'const volatile void *' for 1st argument; take the address of the argument with &
void __asan_unpoison_memory_region(void const volatile *addr, size_t size);
     ^
1 error generated.
[3/559] Building CXX object lib/Support/CMakeFiles/LLVMSupport.dir/FoldingSet.cpp.o
FAILED: lib/Support/CMakeFiles/LLVMSupport.dir/FoldingSet.cpp.o 
/usr/bin/clang++ -DGTEST_HAS_RTTI=0 -D_DEBUG -D_GLIBCXX_ASSERTIONS -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -I/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-fullbuild-dbg-asan/build/lib/Support -I/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-fullbuild-dbg-asan/llvm-project/llvm/lib/Support -I/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-fullbuild-dbg-asan/build/include -I/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-fullbuild-dbg-asan/llvm-project/llvm/include -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time -Werror=unguarded-availability-new -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -pedantic -Wno-long-long -Wc++98-compat-extra-semi -Wimplicit-fallthrough -Wcovered-switch-default -Wno-noexcept-type -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -Wsuggest-override -Wstring-conversion -Wmisleading-indentation -Wctad-maybe-unsupported -fno-omit-frame-pointer -O1 -fsanitize=address -fdiagnostics-color -Werror=global-constructors -g -std=c++17  -fno-exceptions -funwind-tables -fno-rtti -MD -MT lib/Support/CMakeFiles/LLVMSupport.dir/FoldingSet.cpp.o -MF lib/Support/CMakeFiles/LLVMSupport.dir/FoldingSet.cpp.o.d -o lib/Support/CMakeFiles/LLVMSupport.dir/FoldingSet.cpp.o -c /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-fullbuild-dbg-asan/llvm-project/llvm/lib/Support/FoldingSet.cpp
In file included from /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-fullbuild-dbg-asan/llvm-project/llvm/lib/Support/FoldingSet.cpp:14:
In file included from /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-fullbuild-dbg-asan/llvm-project/llvm/include/llvm/ADT/FoldingSet.h:23:
/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-fullbuild-dbg-asan/llvm-project/llvm/include/llvm/Support/Allocator.h:174:7: error: no matching function for call to '__asan_unpoison_memory_region'
      __asan_unpoison_memory_region(AlignedPtr, Size);
      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/lib/llvm-14/lib/clang/14.0.6/include/sanitizer/asan_interface.h:48:6: note: candidate function not viable: no known conversion from 'uintptr_t' (aka 'unsigned long') to 'const volatile void *' for 1st argument; take the address of the argument with &
void __asan_unpoison_memory_region(void const volatile *addr, size_t size);
     ^
1 error generated.
[4/559] Building CXX object lib/Support/CMakeFiles/LLVMSupport.dir/APSInt.cpp.o
FAILED: lib/Support/CMakeFiles/LLVMSupport.dir/APSInt.cpp.o 
/usr/bin/clang++ -DGTEST_HAS_RTTI=0 -D_DEBUG -D_GLIBCXX_ASSERTIONS -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -I/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-fullbuild-dbg-asan/build/lib/Support -I/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-fullbuild-dbg-asan/llvm-project/llvm/lib/Support -I/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-fullbuild-dbg-asan/build/include -I/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-fullbuild-dbg-asan/llvm-project/llvm/include -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time -Werror=unguarded-availability-new -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -pedantic -Wno-long-long -Wc++98-compat-extra-semi -Wimplicit-fallthrough -Wcovered-switch-default -Wno-noexcept-type -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -Wsuggest-override -Wstring-conversion -Wmisleading-indentation -Wctad-maybe-unsupported -fno-omit-frame-pointer -O1 -fsanitize=address -fdiagnostics-color -Werror=global-constructors -g -std=c++17  -fno-exceptions -funwind-tables -fno-rtti -MD -MT lib/Support/CMakeFiles/LLVMSupport.dir/APSInt.cpp.o -MF lib/Support/CMakeFiles/LLVMSupport.dir/APSInt.cpp.o.d -o lib/Support/CMakeFiles/LLVMSupport.dir/APSInt.cpp.o -c /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-fullbuild-dbg-asan/llvm-project/llvm/lib/Support/APSInt.cpp
In file included from /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-fullbuild-dbg-asan/llvm-project/llvm/lib/Support/APSInt.cpp:15:
In file included from /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-fullbuild-dbg-asan/llvm-project/llvm/include/llvm/ADT/FoldingSet.h:23:
Step 6 (build libc) failure: build libc (failure)
@@@BUILD_STEP build libc@@@
Running: ninja libc
[1/559] Building CXX object lib/Support/CMakeFiles/LLVMSupport.dir/Allocator.cpp.o
FAILED: lib/Support/CMakeFiles/LLVMSupport.dir/Allocator.cpp.o 
/usr/bin/clang++ -DGTEST_HAS_RTTI=0 -D_DEBUG -D_GLIBCXX_ASSERTIONS -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -I/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-fullbuild-dbg-asan/build/lib/Support -I/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-fullbuild-dbg-asan/llvm-project/llvm/lib/Support -I/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-fullbuild-dbg-asan/build/include -I/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-fullbuild-dbg-asan/llvm-project/llvm/include -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time -Werror=unguarded-availability-new -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -pedantic -Wno-long-long -Wc++98-compat-extra-semi -Wimplicit-fallthrough -Wcovered-switch-default -Wno-noexcept-type -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -Wsuggest-override -Wstring-conversion -Wmisleading-indentation -Wctad-maybe-unsupported -fno-omit-frame-pointer -O1 -fsanitize=address -fdiagnostics-color -Werror=global-constructors -g -std=c++17  -fno-exceptions -funwind-tables -fno-rtti -MD -MT lib/Support/CMakeFiles/LLVMSupport.dir/Allocator.cpp.o -MF lib/Support/CMakeFiles/LLVMSupport.dir/Allocator.cpp.o.d -o lib/Support/CMakeFiles/LLVMSupport.dir/Allocator.cpp.o -c /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-fullbuild-dbg-asan/llvm-project/llvm/lib/Support/Allocator.cpp
In file included from /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-fullbuild-dbg-asan/llvm-project/llvm/lib/Support/Allocator.cpp:13:
/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-fullbuild-dbg-asan/llvm-project/llvm/include/llvm/Support/Allocator.h:174:7: error: no matching function for call to '__asan_unpoison_memory_region'
      __asan_unpoison_memory_region(AlignedPtr, Size);
      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/lib/llvm-14/lib/clang/14.0.6/include/sanitizer/asan_interface.h:48:6: note: candidate function not viable: no known conversion from 'uintptr_t' (aka 'unsigned long') to 'const volatile void *' for 1st argument; take the address of the argument with &
void __asan_unpoison_memory_region(void const volatile *addr, size_t size);
     ^
1 error generated.
[2/559] Building CXX object lib/Support/CMakeFiles/LLVMSupport.dir/IntervalMap.cpp.o
FAILED: lib/Support/CMakeFiles/LLVMSupport.dir/IntervalMap.cpp.o 
/usr/bin/clang++ -DGTEST_HAS_RTTI=0 -D_DEBUG -D_GLIBCXX_ASSERTIONS -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -I/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-fullbuild-dbg-asan/build/lib/Support -I/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-fullbuild-dbg-asan/llvm-project/llvm/lib/Support -I/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-fullbuild-dbg-asan/build/include -I/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-fullbuild-dbg-asan/llvm-project/llvm/include -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time -Werror=unguarded-availability-new -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -pedantic -Wno-long-long -Wc++98-compat-extra-semi -Wimplicit-fallthrough -Wcovered-switch-default -Wno-noexcept-type -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -Wsuggest-override -Wstring-conversion -Wmisleading-indentation -Wctad-maybe-unsupported -fno-omit-frame-pointer -O1 -fsanitize=address -fdiagnostics-color -Werror=global-constructors -g -std=c++17  -fno-exceptions -funwind-tables -fno-rtti -MD -MT lib/Support/CMakeFiles/LLVMSupport.dir/IntervalMap.cpp.o -MF lib/Support/CMakeFiles/LLVMSupport.dir/IntervalMap.cpp.o.d -o lib/Support/CMakeFiles/LLVMSupport.dir/IntervalMap.cpp.o -c /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-fullbuild-dbg-asan/llvm-project/llvm/lib/Support/IntervalMap.cpp
In file included from /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-fullbuild-dbg-asan/llvm-project/llvm/lib/Support/IntervalMap.cpp:13:
In file included from /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-fullbuild-dbg-asan/llvm-project/llvm/include/llvm/ADT/IntervalMap.h:109:
/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-fullbuild-dbg-asan/llvm-project/llvm/include/llvm/Support/Allocator.h:174:7: error: no matching function for call to '__asan_unpoison_memory_region'
      __asan_unpoison_memory_region(AlignedPtr, Size);
      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/lib/llvm-14/lib/clang/14.0.6/include/sanitizer/asan_interface.h:48:6: note: candidate function not viable: no known conversion from 'uintptr_t' (aka 'unsigned long') to 'const volatile void *' for 1st argument; take the address of the argument with &
void __asan_unpoison_memory_region(void const volatile *addr, size_t size);
     ^
1 error generated.
[3/559] Building CXX object lib/Support/CMakeFiles/LLVMSupport.dir/FoldingSet.cpp.o
FAILED: lib/Support/CMakeFiles/LLVMSupport.dir/FoldingSet.cpp.o 
/usr/bin/clang++ -DGTEST_HAS_RTTI=0 -D_DEBUG -D_GLIBCXX_ASSERTIONS -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -I/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-fullbuild-dbg-asan/build/lib/Support -I/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-fullbuild-dbg-asan/llvm-project/llvm/lib/Support -I/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-fullbuild-dbg-asan/build/include -I/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-fullbuild-dbg-asan/llvm-project/llvm/include -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time -Werror=unguarded-availability-new -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -pedantic -Wno-long-long -Wc++98-compat-extra-semi -Wimplicit-fallthrough -Wcovered-switch-default -Wno-noexcept-type -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -Wsuggest-override -Wstring-conversion -Wmisleading-indentation -Wctad-maybe-unsupported -fno-omit-frame-pointer -O1 -fsanitize=address -fdiagnostics-color -Werror=global-constructors -g -std=c++17  -fno-exceptions -funwind-tables -fno-rtti -MD -MT lib/Support/CMakeFiles/LLVMSupport.dir/FoldingSet.cpp.o -MF lib/Support/CMakeFiles/LLVMSupport.dir/FoldingSet.cpp.o.d -o lib/Support/CMakeFiles/LLVMSupport.dir/FoldingSet.cpp.o -c /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-fullbuild-dbg-asan/llvm-project/llvm/lib/Support/FoldingSet.cpp
In file included from /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-fullbuild-dbg-asan/llvm-project/llvm/lib/Support/FoldingSet.cpp:14:
In file included from /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-fullbuild-dbg-asan/llvm-project/llvm/include/llvm/ADT/FoldingSet.h:23:
/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-fullbuild-dbg-asan/llvm-project/llvm/include/llvm/Support/Allocator.h:174:7: error: no matching function for call to '__asan_unpoison_memory_region'
      __asan_unpoison_memory_region(AlignedPtr, Size);
      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/lib/llvm-14/lib/clang/14.0.6/include/sanitizer/asan_interface.h:48:6: note: candidate function not viable: no known conversion from 'uintptr_t' (aka 'unsigned long') to 'const volatile void *' for 1st argument; take the address of the argument with &
void __asan_unpoison_memory_region(void const volatile *addr, size_t size);
     ^
1 error generated.
[4/559] Building CXX object lib/Support/CMakeFiles/LLVMSupport.dir/APSInt.cpp.o
FAILED: lib/Support/CMakeFiles/LLVMSupport.dir/APSInt.cpp.o 
/usr/bin/clang++ -DGTEST_HAS_RTTI=0 -D_DEBUG -D_GLIBCXX_ASSERTIONS -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -I/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-fullbuild-dbg-asan/build/lib/Support -I/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-fullbuild-dbg-asan/llvm-project/llvm/lib/Support -I/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-fullbuild-dbg-asan/build/include -I/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-fullbuild-dbg-asan/llvm-project/llvm/include -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time -Werror=unguarded-availability-new -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -pedantic -Wno-long-long -Wc++98-compat-extra-semi -Wimplicit-fallthrough -Wcovered-switch-default -Wno-noexcept-type -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -Wsuggest-override -Wstring-conversion -Wmisleading-indentation -Wctad-maybe-unsupported -fno-omit-frame-pointer -O1 -fsanitize=address -fdiagnostics-color -Werror=global-constructors -g -std=c++17  -fno-exceptions -funwind-tables -fno-rtti -MD -MT lib/Support/CMakeFiles/LLVMSupport.dir/APSInt.cpp.o -MF lib/Support/CMakeFiles/LLVMSupport.dir/APSInt.cpp.o.d -o lib/Support/CMakeFiles/LLVMSupport.dir/APSInt.cpp.o -c /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-fullbuild-dbg-asan/llvm-project/llvm/lib/Support/APSInt.cpp
In file included from /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-fullbuild-dbg-asan/llvm-project/llvm/lib/Support/APSInt.cpp:15:
In file included from /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-fullbuild-dbg-asan/llvm-project/llvm/include/llvm/ADT/FoldingSet.h:23:
/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-fullbuild-dbg-asan/llvm-project/llvm/include/llvm/Support/Allocator.h:174:7: error: no matching function for call to '__asan_unpoison_memory_region'
      __asan_unpoison_memory_region(AlignedPtr, Size);
      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/lib/llvm-14/lib/clang/14.0.6/include/sanitizer/asan_interface.h:48:6: note: candidate function not viable: no known conversion from 'uintptr_t' (aka 'unsigned long') to 'const volatile void *' for 1st argument; take the address of the argument with &
void __asan_unpoison_memory_region(void const volatile *addr, size_t size);
     ^
1 error generated.
[5/559] Building CXX object lib/Support/CMakeFiles/LLVMSupport.dir/Z3Solver.cpp.o

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants