[compiler-rt] r313248 - [mips] Fix sem_init_glibc test for MIPS.

Simon Dardis via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 14 13:06:44 PDT 2017


Hi Vitaly,

I was already investigating why the patch didn't fix the mips buildbot, and spotted the potiential
cause of this test failure which is the "(defined(__mips64) ||.." instead of "(defined(__mips64) &&.."
which probably triggered the issue with this bot. Unfortunately, even after correcting that problem,
the test fails anyway.

http://lists.llvm.org/pipermail/llvm-commits/Week-of-Mon-20170911/487215.html

Thanks,
Simon
________________________________
From: Vitaly Buka [vitalybuka at google.com]
Sent: 14 September 2017 20:49
To: Simon Dardis
Cc: llvm-commits; maxim.kuvyrkov at gmail.com
Subject: Re: [compiler-rt] r313248 - [mips] Fix sem_init_glibc test for MIPS.

After this path the test fails on this bot:
http://lab.llvm.org:8011/builders/clang-cmake-armv7-a15-full/builds/10513


Testing: 0 .. 10.. 20.. 30.. 40.. 50.. 60.. 70.. 80.. 90..
FAIL: SanitizerCommon-asan-armhf-Linux :: Linux/sem_init_glibc.cc (35440 of 35754)
******************** TEST 'SanitizerCommon-asan-armhf-Linux :: Linux/sem_init_glibc.cc' FAILED ********************
Script:
--
/home/buildslave/buildslave/clang-cmake-armv7-a15-full/stage1/./bin/clang --driver-mode=g++ -gline-tables-only -fsanitize=address -mcpu=cortex-a15 -mfpu=vfpv3 -marm -O0 -g /home/buildslave/buildslave/clang-cmake-armv7-a15-full/llvm/projects/compiler-rt/test/sanitizer_common/TestCases/Linux/sem_init_glibc.cc -lutil -o /home/buildslave/buildslave/clang-cmake-armv7-a15-full/stage1/projects/compiler-rt/test/sanitizer_common/asan-armhf-Linux/Linux/Output/sem_init_glibc.cc.tmp &&  /home/buildslave/buildslave/clang-cmake-armv7-a15-full/stage1/projects/compiler-rt/test/sanitizer_common/asan-armhf-Linux/Linux/Output/sem_init_glibc.cc.tmp
--
Exit Code: 134

Command Output (stderr):
--
sem_init_glibc.cc.tmp: /home/buildslave/buildslave/clang-cmake-armv7-a15-full/llvm/projects/compiler-rt/test/sanitizer_common/TestCases/Linux/sem_init_glibc.cc:62: int main(): Assertion `GET_SEM_VALUE(a) == 43' failed.
/home/buildslave/buildslave/clang-cmake-armv7-a15-full/stage1/projects/compiler-rt/test/sanitizer_common/asan-armhf-Linux/Linux/Output/sem_init_glibc.cc.script: line 1: 30487 Aborted                 /home/buildslave/buildslave/clang-cmake-armv7-a15-full/stage1/projects/compiler-rt/test/sanitizer_common/asan-armhf-Linux/Linux/Output/sem_init_glibc.cc.tmp

--

********************
Testing: 0 .. 10.. 20.. 30.. 40.. 50.. 60.. 70.. 80.. 90..
FAIL: SanitizerCommon-lsan-armhf-Linux :: Linux/sem_init_glibc.cc (35500 of 35754)
******************** TEST 'SanitizerCommon-lsan-armhf-Linux :: Linux/sem_init_glibc.cc' FAILED ********************
Script:
--
/home/buildslave/buildslave/clang-cmake-armv7-a15-full/stage1/./bin/clang --driver-mode=g++ -gline-tables-only -fsanitize=leak -mcpu=cortex-a15 -mfpu=vfpv3 -marm -O0 -g /home/buildslave/buildslave/clang-cmake-armv7-a15-full/llvm/projects/compiler-rt/test/sanitizer_common/TestCases/Linux/sem_init_glibc.cc -lutil -o /home/buildslave/buildslave/clang-cmake-armv7-a15-full/stage1/projects/compiler-rt/test/sanitizer_common/lsan-armhf-Linux/Linux/Output/sem_init_glibc.cc.tmp &&  /home/buildslave/buildslave/clang-cmake-armv7-a15-full/stage1/projects/compiler-rt/test/sanitizer_common/lsan-armhf-Linux/Linux/Output/sem_init_glibc.cc.tmp
--
Exit Code: 134

Command Output (stderr):
--
sem_init_glibc.cc.tmp: /home/buildslave/buildslave/clang-cmake-armv7-a15-full/llvm/projects/compiler-rt/test/sanitizer_common/TestCases/Linux/sem_init_glibc.cc:59: int main(): Assertion `b != 0xAB' failed.
/home/buildslave/buildslave/clang-cmake-armv7-a15-full/stage1/projects/compiler-rt/test/sanitizer_common/lsan-armhf-Linux/Linux/Output/sem_init_glibc.cc.script: line 1: 30850 Aborted                 /home/buildslave/buildslave/clang-cmake-armv7-a15-full/stage1/projects/compiler-rt/test/sanitizer_common/lsan-armhf-Linux/Linux/Output/sem_init_glibc.cc.tmp

--

********************
Testing: 0 .. 10.. 20.. 30.. 40.. 50.. 60.. 70.. 80.. 90..

On Thu, Sep 14, 2017 at 3:36 AM, Simon Dardis via llvm-commits <llvm-commits at lists.llvm.org<mailto:llvm-commits at lists.llvm.org>> wrote:
Author: sdardis
Date: Thu Sep 14 03:36:04 2017
New Revision: 313248

URL: http://llvm.org/viewvc/llvm-project?rev=313248&view=rev
Log:
[mips] Fix sem_init_glibc test for MIPS.

glibc changed the implementation of semaphores for glibc 2.21 requiring
some target specific changes for this compiler-rt test. Modify the test
to cope with MIPS64 and do some future/correctness work by tying the
define for MIPS64 to exactly the define of __HAVE_64B_ATOMICS in glibc.

Contributions from Nitesh Jain.

Reviewers: eugenis

Differential Revision: https://reviews.llvm.org/D37829

Modified:
    compiler-rt/trunk/test/sanitizer_common/TestCases/Linux/sem_init_glibc.cc

Modified: compiler-rt/trunk/test/sanitizer_common/TestCases/Linux/sem_init_glibc.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/sanitizer_common/TestCases/Linux/sem_init_glibc.cc?rev=313248&r1=313247&r2=313248&view=diff
==============================================================================
--- compiler-rt/trunk/test/sanitizer_common/TestCases/Linux/sem_init_glibc.cc (original)
+++ compiler-rt/trunk/test/sanitizer_common/TestCases/Linux/sem_init_glibc.cc Thu Sep 14 03:36:04 2017
@@ -13,9 +13,11 @@
 typedef uint64_t semval_t;

 // This condition needs to correspond to __HAVE_64B_ATOMICS macro in glibc.
-#elif (defined(__x86_64__) || defined(__aarch64__) || defined(__powerpc64__) || \
-     defined(__s390x__) || defined(__sparc64__) || defined(__alpha__) || \
-     defined(__ia64__) || defined(__m68k__)) && __GLIBC_PREREQ(2, 21)
+#elif (defined(__x86_64__) || defined(__aarch64__) ||                          \
+       defined(__powerpc64__) || defined(__s390x__) || defined(__sparc64__) || \
+       defined(__alpha__) || defined(__ia64__) || defined(__m68k__) ||         \
+       (defined(__mips64) || _MIPS_SIM == _ABI64)) &&                          \
+    __GLIBC_PREREQ(2, 21)
 typedef uint64_t semval_t;
 #else
 typedef unsigned semval_t;


_______________________________________________
llvm-commits mailing list
llvm-commits at lists.llvm.org<mailto:llvm-commits at lists.llvm.org>
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170914/d9b6dbc4/attachment.html>


More information about the llvm-commits mailing list