[test] Make Linux/sem_init_glibc.cpp robust
authorFangrui Song <i@maskray.me>
Sun, 2 Oct 2022 07:47:10 +0000 (00:47 -0700)
committerTobias Hieta <tobias@hieta.se>
Mon, 24 Oct 2022 11:42:41 +0000 (13:42 +0200)
commit086365be7ce0aaeb159fa80d02c426989d5115f3
tree3a1687b51d24bf52067953875e865191b151d5d1
parent4a2c05b05ed07f1f620e94f6524a8b4b2760a0b1
[test] Make Linux/sem_init_glibc.cpp robust

and fix it for 32-bit ports defining sem_init@GLIBC_2.0 (i386, mips32, powerpc32) for glibc>=2.36.

Fix https://github.com/llvm/llvm-project/issues/58079

Reviewed By: mgorny

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

(cherry picked from commit 6f46ff3765dcdc178b9cf52ebd8c03437806798a)
compiler-rt/lib/sanitizer_common/sanitizer_common_interceptors.inc
compiler-rt/test/sanitizer_common/TestCases/Linux/sem_init_glibc.cpp