[compiler-rt] r253129 - Reverting r253080 ([tsan] Don't demangle names not starting with "_Z").

Alexey Samsonov via llvm-commits llvm-commits at lists.llvm.org
Tue Nov 17 16:12:22 PST 2015


Thanks! This also breaks several UBSan tests: UBSan uses Demangle function
to restore type names, they don't start with _Z.

On Sat, Nov 14, 2015 at 2:42 AM, Kuba Brecka via llvm-commits <
llvm-commits at lists.llvm.org> wrote:

> Author: kuba.brecka
> Date: Sat Nov 14 04:42:08 2015
> New Revision: 253129
>
> URL: http://llvm.org/viewvc/llvm-project?rev=253129&view=rev
> Log:
> Reverting r253080 ([tsan] Don't demangle names not starting with "_Z").
>
> This caused bot failures on ARM, e.g.
> http://lab.llvm.org:8011/builders/clang-cmake-armv7-a15-full/builds/9068
>
>
> Modified:
>
> compiler-rt/trunk/lib/sanitizer_common/sanitizer_symbolizer_posix_libcdep.cc
>     compiler-rt/trunk/test/tsan/Darwin/symbolizer-dladdr.cc
>
> Modified:
> compiler-rt/trunk/lib/sanitizer_common/sanitizer_symbolizer_posix_libcdep.cc
> URL:
> http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/sanitizer_common/sanitizer_symbolizer_posix_libcdep.cc?rev=253129&r1=253128&r2=253129&view=diff
>
> ==============================================================================
> ---
> compiler-rt/trunk/lib/sanitizer_common/sanitizer_symbolizer_posix_libcdep.cc
> (original)
> +++
> compiler-rt/trunk/lib/sanitizer_common/sanitizer_symbolizer_posix_libcdep.cc
> Sat Nov 14 04:42:08 2015
> @@ -48,9 +48,6 @@ namespace __sanitizer {
>
>  // Attempts to demangle the name via __cxa_demangle from __cxxabiv1.
>  const char *DemangleCXXABI(const char *name) {
> -  if (name[0] != '_' || name[1] != 'Z')
> -    return name;
> -
>    // FIXME: __cxa_demangle aggressively insists on allocating memory.
>    // There's not much we can do about that, short of providing our
>    // own demangler (libc++abi's implementation could be adapted so that
>
> Modified: compiler-rt/trunk/test/tsan/Darwin/symbolizer-dladdr.cc
> URL:
> http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/tsan/Darwin/symbolizer-dladdr.cc?rev=253129&r1=253128&r2=253129&view=diff
>
> ==============================================================================
> --- compiler-rt/trunk/test/tsan/Darwin/symbolizer-dladdr.cc (original)
> +++ compiler-rt/trunk/test/tsan/Darwin/symbolizer-dladdr.cc Sat Nov 14
> 04:42:08 2015
> @@ -3,12 +3,10 @@
>  #include "../test.h"
>
>  int GlobalData[10];
> -long long x;
>
>  void *Thread(void *a) {
>    barrier_wait(&barrier);
>    GlobalData[2] = 42;
> -  x = 7;
>    return 0;
>  }
>
> @@ -20,7 +18,6 @@ int main() {
>    pthread_t t;
>    pthread_create(&t, 0, Thread, 0);
>    GlobalData[2] = 43;
> -  x = 8;
>    barrier_wait(&barrier);
>    pthread_join(t, 0);
>  }
> @@ -30,5 +27,3 @@ int main() {
>  // CHECK: addr=[[ADDR:0x[0-9,a-f]+]]
>  // CHECK: WARNING: ThreadSanitizer: data race
>  // CHECK: Location is global 'GlobalData' at [[ADDR]]
> ({{.*}}+0x{{[0-9,a-f]+}})
> -// CHECK: WARNING: ThreadSanitizer: data race
> -// CHECK: Location is global 'x' at {{.*}} ({{.*}}+0x{{[0-9,a-f]+}})
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits
>



-- 
Alexey Samsonov
vonosmas at gmail.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20151117/59dc4531/attachment.html>


More information about the llvm-commits mailing list