[PATCH] D88218: [asan][test] XFAIL Posix/no_asan_gen_globals.c on Solaris

Rainer Orth via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 24 04:59:19 PDT 2020


ro created this revision.
ro added a reviewer: vitalybuka.
ro added a project: Sanitizers.
Herald added subscribers: Sanitizers, fedor.sergeev.
ro requested review of this revision.

`Posix/no_asan_gen_globals.c` currently `FAIL`s on Solaris:

  $ nm no_asan_gen_globals.c.tmp.exe | grep ___asan_gen_
  0809696a r .L___asan_gen_.1
  0809a4cd r .L___asan_gen_.2
  080908e2 r .L___asan_gen_.4
  0809a4cd r .L___asan_gen_.5
  0809a529 r .L___asan_gen_.7
  0809a4cd r .L___asan_gen_.8

As detailed in Bug 47607, there are two factors here:

- `clang` plays games by emitting some local labels into the symbol table. When instead one uses `-fno-integrated-as` to have `gas` create the object files, they don't land in the objects in the first place.
- Unlike GNU `ld`, the Solaris `ld` doesn't support support `-X/--discard-locals` but instead relies on the assembler to follow its specification and not emit local labels.

Therefore this patch `XFAIL`s the test on Solaris.

Tested on `amd64-pc-solaris2.11` and `x86_64-pc-linux-gnu`.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D88218

Files:
  compiler-rt/test/asan/TestCases/Posix/no_asan_gen_globals.c


Index: compiler-rt/test/asan/TestCases/Posix/no_asan_gen_globals.c
===================================================================
--- compiler-rt/test/asan/TestCases/Posix/no_asan_gen_globals.c
+++ compiler-rt/test/asan/TestCases/Posix/no_asan_gen_globals.c
@@ -1,5 +1,7 @@
 // FIXME: https://code.google.com/p/address-sanitizer/issues/detail?id=316
 // XFAIL: android
+// Bug 47607
+// XFAIL: solaris
 // Make sure ___asan_gen_* strings do not end up in the symbol table.
 
 // RUN: %clang_asan %s -o %t.exe


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D88218.294017.patch
Type: text/x-patch
Size: 514 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200924/09efd4aa/attachment.bin>


More information about the llvm-commits mailing list