struct stat defined in <asm/stat.h> is incorrect for x32. <asm/stat.h>
is included to get struct __old_kernel_stat. But struct __old_kernel_stat
isn't used for x86-64 nor x32. This patch includes <sys/stat.h> instead
of <asm/stat.h> and comments out size check of struct __old_kernel_stat
for x86-64.
Patch by H.J. Lu
llvm-svn: 199192
This unbreaks the configure build on darwin, where we build with the
stub SDK in -isysroot. Oddly, the cmake build doesn't have this
restriction, which probably means the cmake configs are out of date.
llvm-svn: 198676
Otherwise on (some) 64-bit systems, -Wformat will trigger a warning
because uint64_t is an 'unsigned long' not an 'unsigned long long'.
Consequently, PGOProfiling.c would fail to build if -Werror and
-Wformat are both enabled.
llvm-svn: 198644
This is fairly minimal support for instrumentation based PGO. The data
format is inefficient, and the output file name is hardcoded to
pgo-data.
llvm-svn: 198638
Currently fails with:
gotsan.cc:7686:40: error: the address of 'int __sanitizer_pthread_attr_getstack(void*, void**, size_t*)' will always evaluate as 'true' [-Werror=address]
llvm-svn: 198261
A helper function is a C++ function, and so even though one of the two
definitions is weak, it still technically triggers the ODR. Perhaps
these two definitions are ODR equivalent, but I'm not even confident in
that.
Instead, just define the function once, declare it as weak, and use
a wrapper that is clearly file-local. This avoids two definitions. Also
make the function extern "C" so that we can't even mess up the type
signature somehow or otherwise fail to match up the weak declaration
here with the interceptor defined elsewhere.
llvm-svn: 198253
Per Nick Kledzik (http://llvm.org/bugs/show_bug.cgi?id=17976):
"""
For MacOSX, the labels in __cstring section should be 'L' labels, and the labels
in the __const section should be non-L or 'l' labels. The later ('l') will cause
the linker to remove the label in the final executable.
"""
, so we need to ensure that the globals emitted by ASan have appropriate labels.
llvm-svn: 198022
This should fix http://llvm.org/bugs/show_bug.cgi?id=17976
Another test checking for the global variables' locations and prefixes on Darwin will be committed separately.
llvm-svn: 198017
This is intended to address the following problem.
Episodically we see CHECK-failures when recursive interceptors call back into user code. Effectively we are not "in_rtl" at this point, but it's very complicated and fragile to properly maintain in_rtl property. Instead get rid of it. It was used mostly for sanity CHECKs, which basically never uncover real problems.
Instead introduce ignore_interceptors flag, which is used in very few narrow places to disable recursive interceptors (e.g. during runtime initialization).
llvm-svn: 197979
Print the list of leaked objects after each leak report. Previously we
printed only a joint list of all leaked objects. As a bonus, suppressed objects
are no longer reported.
llvm-svn: 197977