llvm-project/compiler-rt
Evgeniy Stepanov eb37fcbc87 [sanitizer] Fix sem_init_glibc.cc test on __HAVE_64B_ATOMIC arches.
glibc can use one of 2 layouts for semaphores: architectures that
don't HAVE_64B_ATOMIC use an uint32_t field with semaphore value,
then a private field, then a waiting thread count field - this is
the layout currently assumed by the test. However, HAVE_64B_ATOMIC
arches use a fused uint64_t field that contains the value in low bits
and waiting thread count in high bits, followed by a private field.

This resulted in taking private field from the wrong offset on 64-bit
atomic platforms (the test still passed, but didn't actually test
the private field). On big-endian platforms, this resulted in a fail,
since the first 4 bytes overlay the thread count field, and not
the value field.

Found while porting ASan to s390x.

Patch by Marcin Kościelnicki.

llvm-svn: 265715
2016-04-07 20:26:28 +00:00
..
cmake Use `CMAKE_HOST_UNIX` to check the host. 2016-04-06 20:19:31 +00:00
include [libFuzzer] extend the weak memcmp/strcmp/strncmp interceptors to receive the result of the computations. With that, don't do any mutations if memcmp/etc returned 0 2016-01-12 00:43:42 +00:00
lib [sanitizer] Add early call handling to strlen interceptor 2016-04-07 18:07:09 +00:00
make [PGO] Add API for profile merge from buffer 2016-03-03 18:54:46 +00:00
test [sanitizer] Fix sem_init_glibc.cc test on __HAVE_64B_ATOMIC arches. 2016-04-07 20:26:28 +00:00
unittests [CMake] Push the dependency on AddLLVM into the test and unites layers 2016-02-17 16:38:54 +00:00
www Update references to new lists.llvm.org mailing lists. 2015-08-05 03:58:00 +00:00
.arcconfig Update arc config to new domain. 2014-04-07 10:22:41 +00:00
.gitignore Add vim swap files to .gitignore 2014-03-20 19:44:33 +00:00
CMakeLists.txt [asan] Disable thread-safe static initilization with VS 2015 2016-03-21 20:08:59 +00:00
CODE_OWNERS.TXT Add myself as a c-rt owner of ASan/Win 2014-02-27 12:07:43 +00:00
CREDITS.TXT Add Guan-Hong Liu. 2014-06-16 08:38:19 +00:00
LICENSE.TXT Update copyright year to 2016. 2016-03-30 22:38:50 +00:00
Makefile Revert r196490 and fix include paths in makefile-based build 2013-12-05 10:40:11 +00:00
README.txt Moved the builtins documentation to lib/builtins/ 2014-05-28 23:09:45 +00:00

README.txt

Compiler-RT
================================

This directory and its subdirectories contain source code for the compiler
support routines.

Compiler-RT is open source software. You may freely distribute it under the
terms of the license agreement found in LICENSE.txt.

================================