[asan] Fix a comment in a test.


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@217869 91177308-0d34-0410-b5e6-96231b3b80d8
[asan] De-flake one test.

This change replaces an in-test timeout with an unconditional blocking wait.
It speeds up normal execution significantly at the cost of hanging up indefinitely
in case of a failure. This is a very specific regression test and we don't
expect any failures in the future.

Another approach ould be increasing the timeout to ~8 seconds, which seems too
much for a lit test.


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@217870 91177308-0d34-0410-b5e6-96231b3b80d8
Implement floatsitf, floatunstfsi, which perform
(signed/unsigned)integer to quad-precision conversion.

Submitted by GuanHong Liu.

Differential Revision: http://reviews.llvm.org/D2805


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@217901 91177308-0d34-0410-b5e6-96231b3b80d8
[sanitizer]  Fix global constructor warning in sanitizer; patch by Samuel F Antao

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@217904 91177308-0d34-0410-b5e6-96231b3b80d8
tsan: support longjmp out of signal handlers
Fixes https://code.google.com/p/thread-sanitizer/issues/detail?id=75



git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@217908 91177308-0d34-0410-b5e6-96231b3b80d8
tsan: fix crash when a program registers zillions of atexit callbacks
I don't remember that crash on mmap in internal allocator
ever yielded anything useful, only crashes in rare wierd untested situations.
One of the reasons for crash was to catch if tsan starts allocating
clocks using mmap. Tsan does not allocate clocks using internal_alloc anymore.
Solve it once and for all by allowing mmaps.



git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@217929 91177308-0d34-0410-b5e6-96231b3b80d8
Add FreeBSD support to the address sanitizer's deep_call_stack.cc test case
Differential Revision: http://reviews.llvm.org/D4562


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@217943 91177308-0d34-0410-b5e6-96231b3b80d8
Do not link the dyndd runtime library against libdl on FreeBSD
Differential Revision: http://reviews.llvm.org/D5207


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@217944 91177308-0d34-0410-b5e6-96231b3b80d8
PR20721: Don't let UBSan print inaccessible memory

Summary:
UBSan needs to check if memory snippet it's going to print resides
in addressable memory. Similar check might be helpful in ASan with
dump_instruction_bytes option (see http://reviews.llvm.org/D5167).

Instead of scanning /proc/self/maps manually, delegate this check to
the OS kernel: try to write this memory in a syscall and assume that
memory is inaccessible if the syscall failed (e.g. with EFAULT).

Fixes PR20721.

Test Plan: compiler-rt test suite

Reviewers: eugenis, glider

Reviewed By: glider

Subscribers: emaste, ygribov, llvm-commits, glider, rsmith

Differential Revision: http://reviews.llvm.org/D5253

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@217971 91177308-0d34-0410-b5e6-96231b3b80d8
tsan: fix bug number in comment



git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@217992 91177308-0d34-0410-b5e6-96231b3b80d8
Enable Asan lit tests on FreeBSD.
Differential Revision: http://reviews.llvm.org/D5375


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@218042 91177308-0d34-0410-b5e6-96231b3b80d8
tsan: fix double semicolon ;;



git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@218067 91177308-0d34-0410-b5e6-96231b3b80d8
tsan: fix signal_longjmp test in debug mode
In debug mode tsan checks that user accesses
access user memory. NULL is not user memory.
So the test fails. Allocate real inaccessible
memory for the test.



git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@218069 91177308-0d34-0410-b5e6-96231b3b80d8
tsan: more careful handling of signals
On some tests we see that signals are not delivered
when a thread is blocked in epoll_wait. The hypothesis
is that the signal is delivered right before epoll_wait
call. The signal is queued as in_blocking_func is not set
yet, and then the thread just blocks in epoll_wait forever.
So double check pending signals *after* setting
in_blocking_func. This way we either queue a signal
and handle it in the beginning of a blocking func,
or process the signal synchronously if it's delivered
when in_blocking_func is set.



git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@218070 91177308-0d34-0410-b5e6-96231b3b80d8
[asan] Fix a bug in asan_symbolize.py

Do not forget to add newlines between multiple symbolized lines corresponding to
a single input line (i.e. inlining).

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@218071 91177308-0d34-0410-b5e6-96231b3b80d8
[asan] Initialize logfile in asan_symbolize.py to sys.stdin.

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@218072 91177308-0d34-0410-b5e6-96231b3b80d8
builtins: remove definition of __ARM_ARCH

__ARM_ARCH is part of the ACLE specification.  At least clang and GCC have
supported this part of the ACLE for some time now.  Let the compiler provide the
proper definition for the macro rather than try to guess it.

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@218095 91177308-0d34-0410-b5e6-96231b3b80d8
builtins: 80-column

Re-wrap a couple of lines.  NFC.

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@218096 91177308-0d34-0410-b5e6-96231b3b80d8
[ASan] Print a hint when the program crashes accessing the zero page.
This may help some users figure out that the error report is valid.


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@218123 91177308-0d34-0410-b5e6-96231b3b80d8
[asan] asan_device_setup improvements.

* Allow user SEGV handler if Android-L-like setup is detected.
  Necessary for correctness.
* Change file context labels on the wrapper script to appease SELinux.


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@218124 91177308-0d34-0410-b5e6-96231b3b80d8