ASAN: keep support for Global::location
We as GCC still emit __asan_global_source_location for global variables
and we would like to use it in the future. On other hand, we don't
support llvm-symbolizer and the default libbacktraace symbolizer
does not support location info.
-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 is always used for mips
when build libsanitizer in LLVM. Thus
FIRST_32_SECOND_64((_MIPS_SIM == _ABIN32) ? 176 : 160, 216);
instead of
FIRST_32_SECOND_64((_MIPS_SIM == _ABIN32) ? 160 : 144, 216);
in sanitizer_platform_limits_posix.h.
To keep sync with LLVM and to make the code simple, we use the
largefile options always.
libsanitizer/
* configure.ac: set -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
always for mips*.
* configure: Regenerate.
When using GNU ld on Solaris, a large number of asan tests SEGV, while
Solaris ld is fine. This happens inside the __tls_get_addr interceptor,
which is highly glibc-specific. Therefore this patch disables that
interceptor.
Posted upstream at https://reviews.llvm.org/D141385.
Tested on i386-pc-solaris2.11 and sparc-sun-solaris2.11.
2023-01-17 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
libsanitizer:
* sanitizer_common/sanitizer_platform_interceptors.h: Cherry-pick
llvm-project revision 951cf656b2faaf6fc0baa867293c0cb0ab131951.
I've noticed an inconsistency with the other sanitizers.
For -fsanitize={address,thread,leak} we link into binaries
lib*san_preinit.o such that the -lasan, -ltsan or -llsan libraries
are initialized as early as possible through .preinit_array.
The hwasan library has the same thing, but we strangely compiled
it into the library (where it apparently didn't do anything,
.preinit_array doesn't seem to be created for shared libraries),
rather than installing it like in the other 3 cases.
The following patch handles it for hwasan similarly to asan, tsan and lsan.
I don't have any hw with hwasan support, so I've just checked it
builds and installs as expected and that
gcc -fsanitize=hwaddress -o a a.c -mlam=u57
on trivial main results in .preinit_array section in the binary.
2022-12-19 Jakub Jelinek <jakub@redhat.com>
* config/gnu-user.h (LIBHWASAN_EARLY_SPEC): Add libhwasan_preinit.o
to link spec if not -shared.
* hwasan/Makefile.am (nodist_toolexeclib_HEADERS): Set to
libhwasan_preinit.o.
(hwasan_files): Remove hwasan_preinit.cpp.
(libhwasan_preinit.o): Copy from hwasan_preinit.o.
* hwasan/Makefile.in: Regenerated.
The r13-4547 commit added new non-static function to libbacktrace:
backtrace_uncompress_zstd but for the libsanitizer use we need to
rename it, so that it is in __asan_* namespace and doesn't clash
with other copies of libbacktrace.
2022-12-13 Jakub Jelinek <jakub@redhat.com>
libsanitizer/
PR sanitizer/108072
* libbacktrace/backtrace-rename.h (backtrace_uncompress_zstd): Define.
The latest import has added dependencies on system resources that are not
present until Darwin 16. It might be possible to work around these for
earlier systems, but in the short-term we have to disable the build so that
bootstrap completes.
Signed-off-by: Iain Sandoe <iain@sandoe.co.uk>
libsanitizer/ChangeLog:
* configure.tgt: Restrict build to Darwin 16 or newer.
This change adds the configury bits to activate the build of
shared libs on VxWorks ports configured with --enable-shared,
for libraries variants where this is generally supported (rtp,
code model !large - currently not compatible with -fPIC).
Set lt_cv_deplibs_check_method in libtool.m4, so the build of
libraries know how to establish dependencies. This is useful in
configurations such as aarch64 where proper support of LSE relies
on accurate dependency information between libstdc++ and libgcc_s
to begin with.
Regenerate configure scripts to reflect libtool.m4 change.
2022-10-09 Olivier Hainque <hainque@adacore.com>
* libtool.m4 (*vxworks*): When enable_shared, set dynamic_linker
and friends for rtp !large. Assume the linker has the required
abilities and set lt_cv_deplibs_check_method.
gcc/
* config.gcc (*vxworks*): Add t-slibgcc fragment
if enable_shared.
libgcc/
* config.host (*vxworks*): When enable_shared, add
libgcc and crtstuff "shared" fragments for rtp except
large code model.
(aarch64*-wrs-vxworks7*): Remove t-slibgcc-libgcc from
the list of fragments.
2022-10-09 Olivier Hainque <hainque@adacore.com>
gcc/
* configure: Regenerate.
libatomic/
* configure: Regenerate.
libbacktrace/
* configure: Regenerate.
libcc1/
* configure: Regenerate.
libffi/
* configure: Regenerate.
libgfortran/
* configure: Regenerate.
libgomp/
* configure: Regenerate.
libitm/
* configure: Regenerate.
libobjc/
* configure: Regenerate.
liboffloadmic/
* configure: Regenerate.
liboffloadmic/
* plugin/configure: Regenerate.
libphobos/
* configure: Regenerate.
libquadmath/
* configure: Regenerate.
libsanitizer/
* configure: Regenerate.
libssp/
* configure: Regenerate.
libstdc++-v3/
* configure: Regenerate.
libvtv/
* configure: Regenerate.
lto-plugin/
* configure: Regenerate.
zlib/
* configure: Regenerate.
The latest libsanitizer import broke Solaris 11.3 bootstrap again, due
to an oversight of mine. A fix has been committed upstream
https://reviews.llvm.org/D133556
This patch cherry-picks it. Tested on Solaris 11.3 and 11.4, SPARC and
x86.
2022-09-23 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
libsanitizer:
PR sanitizer/105531
* sanitizer_common/sanitizer_procmaps_solaris.cpp: Cherry-pick
llvm-project revision 1cd4d63fb9ab0f04c7151911dde0d58b673823de.
The latest merge to libsanitizer includes changes to handle macOS 13+.
However, these changes are incompatible with GCC and so we need to find
an alternate solution. To restore bootstrap back this change out until
the alternate can be found.
The LoongArch support for libubsan and libasan has been added in:
- https://reviews.llvm.org/D129371
- https://reviews.llvm.org/D129418
and we've merged them in r13-2269. It's time to enable them.
No unexpected failures in GCC asan.exp and ubsan.exp tests.
libsanitizer/ChangeLog:
* configure.tgt: Allow loongarch64-*-linux*.
2bfb0fcb51510f22723c8cdfefe [Sanitizer][MIPS] Fix stat struct size for the O32 ABI.
Signed-off-by: Dimitrije Milosevic <dimitrije.milosevic@syrmia.com>.
The libsanitizer build has been broken on Solaris 11.3 by the latest
import. An upstream patch to fix this has now been committed:
[sanitizer_common] Support Solaris < 11.4 in GetStaticTlsBoundary
https://reviews.llvm.org/D120059
I'd like to cherry-pick it into libsanitizer, too.
Bootstrapped without regressions on sparc-sun-solaris2.11,
i386-pc-solaris2.11 (both Solaris 11.3 and 11.4), and
x86_64-pc-linux-gnu.
2022-07-21 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
libsanitizer:
PR sanitizer/105531
* sanitizer_common/sanitizer_linux_libcdep.cpp,
sanitizer_common/sanitizer_solaris.h:: Cherry-pick
llvm-project revision 3776db9a4fd2080d23d6a5f52e405eea44558761.