llvm / llvm-project

The LLVM Project is a collection of modular and reusable compiler and toolchain technologies.
http://llvm.org
Other
26.82k stars 10.99k forks source link

[ppc][compiler-rt] Potential miscompile in compiler-rt #84654

Open vitalybuka opened 4 months ago

vitalybuka commented 4 months ago

From https://lab.llvm.org/buildbot/#/builders/18/builds/15713/steps/9/logs/stdio

[8/9] Running compiler_rt regression tests
AddressSanitizer: CHECK failed: sanitizer_common.h:534 "((size_)) == ((capacity()))" (0xaaaaaaaaaaaaaaaa, 0x0) (tid=43152)
    #0 0x119255590 in __asan::CheckUnwind() /home/buildbots/ppc64be-sanitizer/sanitizer-ppc64be/build/llvm-project/compiler-rt/lib/asan/asan_rtl.cpp:69:3
    #1 0x119274da4 in __sanitizer::CheckFailed(char const*, int, char const*, unsigned long long, unsigned long long) /home/buildbots/ppc64be-sanitizer/sanitizer-ppc64be/build/llvm-project/compiler-rt/lib/sanitizer_common/sanitizer_termination.cpp:86:5
    #2 0x119289c28 in push_back /home/buildbots/ppc64be-sanitizer/sanitizer-ppc64be/build/llvm-project/compiler-rt/lib/lsan/../sanitizer_common/sanitizer_common.h:534:7
    #3 0x119289c28 in ProcessRootRegions /home/buildbots/ppc64be-sanitizer/sanitizer-ppc64be/build/llvm-project/compiler-rt/lib/lsan/lsan_common.cpp:574:22
    #4 0x119289c28 in ClassifyAllChunks /home/buildbots/ppc64be-sanitizer/sanitizer-ppc64be/build/llvm-project/compiler-rt/lib/lsan/lsan_common.cpp:643:3
    #5 0x119289c28 in __lsan::CheckForLeaksCallback(__sanitizer::SuspendedThreadsList const&, void*) /home/buildbots/ppc64be-sanitizer/sanitizer-ppc64be/build/llvm-project/compiler-rt/lib/lsan/lsan_common.cpp:734:3
    #6 0x119297184 in __sanitizer::TracerThread(void*) /home/buildbots/ppc64be-sanitizer/sanitizer-ppc64be/build/llvm-project/compiler-rt/lib/sanitizer_common/sanitizer_stoptheworld_linux_libcdep.cpp:321:5
    #7 0x119268908 in __sanitizer::internal_clone(int (*)(void*), void*, int, void*, int*, void*, int*) /home/buildbots/ppc64be-sanitizer/sanitizer-ppc64be/build/llvm-project/compiler-rt/lib/sanitizer_common/sanitizer_linux.cpp:1571:3
AddressSanitizer: CHECK failed: sanitizer_common.h:534 "((size_)) == ((capacity()))" (0xaaaaaaaaaaaaaaaa, 0x0) (tid=43155)
    #0 0x1357f5590 in __asan::CheckUnwind() /home/buildbots/ppc64be-sanitizer/sanitizer-ppc64be/build/llvm-project/compiler-rt/lib/asan/asan_rtl.cpp:69:3
    #1 0x135814da4 in __sanitizer::CheckFailed(char const*, int, char const*, unsigned long long, unsigned long long) /home/buildbots/ppc64be-sanitizer/sanitizer-ppc64be/build/llvm-project/compiler-rt/lib/sanitizer_common/sanitizer_termination.cpp:86:5
    #2 0x135829c28 in push_back /home/buildbots/ppc64be-sanitizer/sanitizer-ppc64be/build/llvm-project/compiler-rt/lib/lsan/../sanitizer_common/sanitizer_common.h:534:7
    #3 0x135829c28 in ProcessRootRegions /home/buildbots/ppc64be-sanitizer/sanitizer-ppc64be/build/llvm-project/compiler-rt/lib/lsan/lsan_common.cpp:574:22
    #4 0x135829c28 in ClassifyAllChunks /home/buildbots/ppc64be-sanitizer/sanitizer-ppc64be/build/llvm-project/compiler-rt/lib/lsan/lsan_common.cpp:643:3
    #5 0x135829c28 in __lsan::CheckForLeaksCallback(__sanitizer::SuspendedThreadsList const&, void*) /home/buildbots/ppc64be-sanitizer/sanitizer-ppc64be/build/llvm-project/compiler-rt/lib/lsan/lsan_common.cpp:734:3
    #6 0x135837184 in __sanitizer::TracerThread(void*) /home/buildbots/ppc64be-sanitizer/sanitizer-ppc64be/build/llvm-project/compiler-rt/lib/sanitizer_common/sanitizer_stoptheworld_linux_libcdep.cpp:321:5
    #7 0x135808908 in __sanitizer::internal_clone(int (*)(void*), void*, int, void*, int*, void*, int*) /home/buildbots/ppc64be-sanitizer/sanitizer-ppc64be/build/llvm-project/compiler-rt/lib/sanitizer_common/sanitizer_linux.cpp:1571:3
AddressSanitizer: CHECK failed: sanitizer_common.h:534 "((size_)) == ((capacity()))" (0xaaaaaaaaaaaaaaaa, 0x0) (tid=43164)
    #0 0x3fff8a63a924 in __asan::CheckUnwind() /home/buildbots/ppc64be-sanitizer/sanitizer-ppc64be/build/llvm-project/compiler-rt/lib/asan/asan_rtl.cpp:69:3
    #1 0x3fff8a5312f0 in __sanitizer::CheckFailed(char const*, int, char const*, unsigned long long, unsigned long long) /home/buildbots/ppc64be-sanitizer/sanitizer-ppc64be/build/llvm-project/compiler-rt/lib/sanitizer_common/sanitizer_termination.cpp:86:5
    #2 0x3fff8a54b6d4 in push_back /home/buildbots/ppc64be-sanitizer/sanitizer-ppc64be/build/llvm-project/compiler-rt/lib/lsan/../sanitizer_common/sanitizer_common.h:534:7
    #3 0x3fff8a54b6d4 in ProcessRootRegions /home/buildbots/ppc64be-sanitizer/sanitizer-ppc64be/build/llvm-project/compiler-rt/lib/lsan/lsan_common.cpp:574:22
    #4 0x3fff8a54b6d4 in ClassifyAllChunks /home/buildbots/ppc64be-sanitizer/sanitizer-ppc64be/build/llvm-project/compiler-rt/lib/lsan/lsan_common.cpp:643:3
    #5 0x3fff8a54b6d4 in __lsan::CheckForLeaksCallback(__sanitizer::SuspendedThreadsList const&, void*) /home/buildbots/ppc64be-sanitizer/sanitizer-ppc64be/build/llvm-project/compiler-rt/lib/lsan/lsan_common.cpp:734:3
    #6 0x3fff8a536168 in __sanitizer::TracerThread(void*) /home/buildbots/ppc64be-sanitizer/sanitizer-ppc64be/build/llvm-project/compiler-rt/lib/sanitizer_common/sanitizer_stoptheworld_linux_libcdep.cpp:321:5
    #7 0x3fff8a52434c in __sanitizer::internal_clone(int (*)(void*), void*, int, void*, int*, void*, int*) /home/buildbots/ppc64be-sanitizer/sanitizer-ppc64be/build/llvm-project/compiler-rt/lib/sanitizer_common/sanitizer_linux.cpp:1571:3
AddressSanitizer: CHECK failed: sanitizer_common.h:534 "((size_)) == ((capacity()))" (0xaaaaaaaaaaaaaaaa, 0x0) (tid=43168)
    #0 0x3fff91f6a924 in __asan::CheckUnwind() /home/buildbots/ppc64be-sanitizer/sanitizer-ppc64be/build/llvm-project/compiler-rt/lib/asan/asan_rtl.cpp:69:3
    #1 0x3fff91e612f0 in __sanitizer::CheckFailed(char const*, int, char const*, unsigned long long, unsigned long long) /home/buildbots/ppc64be-sanitizer/sanitizer-ppc64be/build/llvm-project/compiler-rt/lib/sanitizer_common/sanitizer_termination.cpp:86:5
    #2 0x3fff91e7b6d4 in push_back /home/buildbots/ppc64be-sanitizer/sanitizer-ppc64be/build/llvm-project/compiler-rt/lib/lsan/../sanitizer_common/sanitizer_common.h:534:7
    #3 0x3fff91e7b6d4 in ProcessRootRegions /home/buildbots/ppc64be-sanitizer/sanitizer-ppc64be/build/llvm-project/compiler-rt/lib/lsan/lsan_common.cpp:574:22
    #4 0x3fff91e7b6d4 in ClassifyAllChunks /home/buildbots/ppc64be-sanitizer/sanitizer-ppc64be/build/llvm-project/compiler-rt/lib/lsan/lsan_common.cpp:643:3
    #5 0x3fff91e7b6d4 in __lsan::CheckForLeaksCallback(__sanitizer::SuspendedThreadsList const&, void*) /home/buildbots/ppc64be-sanitizer/sanitizer-ppc64be/build/llvm-project/compiler-rt/lib/lsan/lsan_common.cpp:734:3
    #6 0x3fff91e66168 in __sanitizer::TracerThread(void*) /home/buildbots/ppc64be-sanitizer/sanitizer-ppc64be/build/llvm-project/compiler-rt/lib/sanitizer_common/sanitizer_stoptheworld_linux_libcdep.cpp:321:5
    #7 0x3fff91e5434c in __sanitizer::internal_clone(int (*)(void*), void*, int, void*, int*, void*, int*) /home/buildbots/ppc64be-sanitizer/sanitizer-ppc64be/build/llvm-project/compiler-rt/lib/sanitizer_common/sanitizer_linux.cpp:1571:3
llvm-lit:
llvmbot commented 4 months ago

@llvm/issue-subscribers-backend-powerpc

Author: Vitaly Buka (vitalybuka)

From https://lab.llvm.org/buildbot/#/builders/18/builds/15713/steps/9/logs/stdio ``` [8/9] Running compiler_rt regression tests AddressSanitizer: CHECK failed: sanitizer_common.h:534 "((size_)) == ((capacity()))" (0xaaaaaaaaaaaaaaaa, 0x0) (tid=43152) #0 0x119255590 in __asan::CheckUnwind() /home/buildbots/ppc64be-sanitizer/sanitizer-ppc64be/build/llvm-project/compiler-rt/lib/asan/asan_rtl.cpp:69:3 #1 0x119274da4 in __sanitizer::CheckFailed(char const*, int, char const*, unsigned long long, unsigned long long) /home/buildbots/ppc64be-sanitizer/sanitizer-ppc64be/build/llvm-project/compiler-rt/lib/sanitizer_common/sanitizer_termination.cpp:86:5 #2 0x119289c28 in push_back /home/buildbots/ppc64be-sanitizer/sanitizer-ppc64be/build/llvm-project/compiler-rt/lib/lsan/../sanitizer_common/sanitizer_common.h:534:7 #3 0x119289c28 in ProcessRootRegions /home/buildbots/ppc64be-sanitizer/sanitizer-ppc64be/build/llvm-project/compiler-rt/lib/lsan/lsan_common.cpp:574:22 #4 0x119289c28 in ClassifyAllChunks /home/buildbots/ppc64be-sanitizer/sanitizer-ppc64be/build/llvm-project/compiler-rt/lib/lsan/lsan_common.cpp:643:3 #5 0x119289c28 in __lsan::CheckForLeaksCallback(__sanitizer::SuspendedThreadsList const&, void*) /home/buildbots/ppc64be-sanitizer/sanitizer-ppc64be/build/llvm-project/compiler-rt/lib/lsan/lsan_common.cpp:734:3 #6 0x119297184 in __sanitizer::TracerThread(void*) /home/buildbots/ppc64be-sanitizer/sanitizer-ppc64be/build/llvm-project/compiler-rt/lib/sanitizer_common/sanitizer_stoptheworld_linux_libcdep.cpp:321:5 #7 0x119268908 in __sanitizer::internal_clone(int (*)(void*), void*, int, void*, int*, void*, int*) /home/buildbots/ppc64be-sanitizer/sanitizer-ppc64be/build/llvm-project/compiler-rt/lib/sanitizer_common/sanitizer_linux.cpp:1571:3 AddressSanitizer: CHECK failed: sanitizer_common.h:534 "((size_)) == ((capacity()))" (0xaaaaaaaaaaaaaaaa, 0x0) (tid=43155) #0 0x1357f5590 in __asan::CheckUnwind() /home/buildbots/ppc64be-sanitizer/sanitizer-ppc64be/build/llvm-project/compiler-rt/lib/asan/asan_rtl.cpp:69:3 #1 0x135814da4 in __sanitizer::CheckFailed(char const*, int, char const*, unsigned long long, unsigned long long) /home/buildbots/ppc64be-sanitizer/sanitizer-ppc64be/build/llvm-project/compiler-rt/lib/sanitizer_common/sanitizer_termination.cpp:86:5 #2 0x135829c28 in push_back /home/buildbots/ppc64be-sanitizer/sanitizer-ppc64be/build/llvm-project/compiler-rt/lib/lsan/../sanitizer_common/sanitizer_common.h:534:7 #3 0x135829c28 in ProcessRootRegions /home/buildbots/ppc64be-sanitizer/sanitizer-ppc64be/build/llvm-project/compiler-rt/lib/lsan/lsan_common.cpp:574:22 #4 0x135829c28 in ClassifyAllChunks /home/buildbots/ppc64be-sanitizer/sanitizer-ppc64be/build/llvm-project/compiler-rt/lib/lsan/lsan_common.cpp:643:3 #5 0x135829c28 in __lsan::CheckForLeaksCallback(__sanitizer::SuspendedThreadsList const&, void*) /home/buildbots/ppc64be-sanitizer/sanitizer-ppc64be/build/llvm-project/compiler-rt/lib/lsan/lsan_common.cpp:734:3 #6 0x135837184 in __sanitizer::TracerThread(void*) /home/buildbots/ppc64be-sanitizer/sanitizer-ppc64be/build/llvm-project/compiler-rt/lib/sanitizer_common/sanitizer_stoptheworld_linux_libcdep.cpp:321:5 #7 0x135808908 in __sanitizer::internal_clone(int (*)(void*), void*, int, void*, int*, void*, int*) /home/buildbots/ppc64be-sanitizer/sanitizer-ppc64be/build/llvm-project/compiler-rt/lib/sanitizer_common/sanitizer_linux.cpp:1571:3 AddressSanitizer: CHECK failed: sanitizer_common.h:534 "((size_)) == ((capacity()))" (0xaaaaaaaaaaaaaaaa, 0x0) (tid=43164) #0 0x3fff8a63a924 in __asan::CheckUnwind() /home/buildbots/ppc64be-sanitizer/sanitizer-ppc64be/build/llvm-project/compiler-rt/lib/asan/asan_rtl.cpp:69:3 #1 0x3fff8a5312f0 in __sanitizer::CheckFailed(char const*, int, char const*, unsigned long long, unsigned long long) /home/buildbots/ppc64be-sanitizer/sanitizer-ppc64be/build/llvm-project/compiler-rt/lib/sanitizer_common/sanitizer_termination.cpp:86:5 #2 0x3fff8a54b6d4 in push_back /home/buildbots/ppc64be-sanitizer/sanitizer-ppc64be/build/llvm-project/compiler-rt/lib/lsan/../sanitizer_common/sanitizer_common.h:534:7 #3 0x3fff8a54b6d4 in ProcessRootRegions /home/buildbots/ppc64be-sanitizer/sanitizer-ppc64be/build/llvm-project/compiler-rt/lib/lsan/lsan_common.cpp:574:22 #4 0x3fff8a54b6d4 in ClassifyAllChunks /home/buildbots/ppc64be-sanitizer/sanitizer-ppc64be/build/llvm-project/compiler-rt/lib/lsan/lsan_common.cpp:643:3 #5 0x3fff8a54b6d4 in __lsan::CheckForLeaksCallback(__sanitizer::SuspendedThreadsList const&, void*) /home/buildbots/ppc64be-sanitizer/sanitizer-ppc64be/build/llvm-project/compiler-rt/lib/lsan/lsan_common.cpp:734:3 #6 0x3fff8a536168 in __sanitizer::TracerThread(void*) /home/buildbots/ppc64be-sanitizer/sanitizer-ppc64be/build/llvm-project/compiler-rt/lib/sanitizer_common/sanitizer_stoptheworld_linux_libcdep.cpp:321:5 #7 0x3fff8a52434c in __sanitizer::internal_clone(int (*)(void*), void*, int, void*, int*, void*, int*) /home/buildbots/ppc64be-sanitizer/sanitizer-ppc64be/build/llvm-project/compiler-rt/lib/sanitizer_common/sanitizer_linux.cpp:1571:3 AddressSanitizer: CHECK failed: sanitizer_common.h:534 "((size_)) == ((capacity()))" (0xaaaaaaaaaaaaaaaa, 0x0) (tid=43168) #0 0x3fff91f6a924 in __asan::CheckUnwind() /home/buildbots/ppc64be-sanitizer/sanitizer-ppc64be/build/llvm-project/compiler-rt/lib/asan/asan_rtl.cpp:69:3 #1 0x3fff91e612f0 in __sanitizer::CheckFailed(char const*, int, char const*, unsigned long long, unsigned long long) /home/buildbots/ppc64be-sanitizer/sanitizer-ppc64be/build/llvm-project/compiler-rt/lib/sanitizer_common/sanitizer_termination.cpp:86:5 #2 0x3fff91e7b6d4 in push_back /home/buildbots/ppc64be-sanitizer/sanitizer-ppc64be/build/llvm-project/compiler-rt/lib/lsan/../sanitizer_common/sanitizer_common.h:534:7 #3 0x3fff91e7b6d4 in ProcessRootRegions /home/buildbots/ppc64be-sanitizer/sanitizer-ppc64be/build/llvm-project/compiler-rt/lib/lsan/lsan_common.cpp:574:22 #4 0x3fff91e7b6d4 in ClassifyAllChunks /home/buildbots/ppc64be-sanitizer/sanitizer-ppc64be/build/llvm-project/compiler-rt/lib/lsan/lsan_common.cpp:643:3 #5 0x3fff91e7b6d4 in __lsan::CheckForLeaksCallback(__sanitizer::SuspendedThreadsList const&, void*) /home/buildbots/ppc64be-sanitizer/sanitizer-ppc64be/build/llvm-project/compiler-rt/lib/lsan/lsan_common.cpp:734:3 #6 0x3fff91e66168 in __sanitizer::TracerThread(void*) /home/buildbots/ppc64be-sanitizer/sanitizer-ppc64be/build/llvm-project/compiler-rt/lib/sanitizer_common/sanitizer_stoptheworld_linux_libcdep.cpp:321:5 #7 0x3fff91e5434c in __sanitizer::internal_clone(int (*)(void*), void*, int, void*, int*, void*, int*) /home/buildbots/ppc64be-sanitizer/sanitizer-ppc64be/build/llvm-project/compiler-rt/lib/sanitizer_common/sanitizer_linux.cpp:1571:3 llvm-lit: ```