Commit Graph

423 Commits

Author SHA1 Message Date
Martin Liska
cab2636174 libsanitizer: cherry-pick commit 8f5962b1ccb5fcd4d4544121d43efb860ac3cc6d from upstream
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.
2023-02-24 09:14:40 +01:00
GCC Administrator
317525b03e Daily bump. 2023-02-01 00:18:50 +00:00
H.J. Lu
a9fbc6687f libsanitizer: cherry-pick commit 742bcbf685bc from upstream
cherry-pick:

742bcbf685bc compiler-rt/lib: Add .Linterceptor_sigsetjmp

	PR sanitizer/108106
	* hwasan/hwasan_setjmp_x86_64.S (__interceptor_setjmp): Jump
	to .Linterceptor_sigsetjmp instead of __interceptor_sigsetjmp.
	(__interceptor_sigsetjmp): Add a local alias,
	.Linterceptor_sigsetjmp.
2023-01-31 14:56:59 -08:00
Martin Liska
3e40511959 libsanitizer: Regenerate configure
libsanitizer/ChangeLog:

	* configure: Regenerate.
2023-01-31 10:35:33 +01:00
YunQiang Su
e08835fd3a libsanitizer/mips: always build with largefile support
-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.
2023-01-31 10:00:44 +08:00
GCC Administrator
8d07b193d7 Daily bump. 2023-01-18 00:17:21 +00:00
Rainer Orth
85b45cccdf libsanitizer: Fix asan SEGVs with gld on Solaris
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.
2023-01-17 10:56:20 +01:00
GCC Administrator
d2ef2327bb Daily bump. 2022-12-20 00:17:00 +00:00
Jakub Jelinek
f39b7a4d37 hwasan: Add libhwasan_preinit.o
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.
2022-12-19 11:14:55 +01:00
GCC Administrator
f17ddf2c48 Daily bump. 2022-12-14 00:18:37 +00:00
Jakub Jelinek
0a43f7b1a7 libsanitizer: Fix up libbacktrace build after r13-4547 [PR108072]
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.
2022-12-13 10:30:36 +01:00
GCC Administrator
40ce6485f3 Daily bump. 2022-12-10 00:17:39 +00:00
liuhongt
2996b5c053 Enable hwasan for x86-64.
libsanitizer
	* configure.tgt: Enable hwasan for x86-64.
2022-12-09 09:37:36 +08:00
GCC Administrator
102f3cef56 Daily bump. 2022-12-05 00:17:24 +00:00
Iain Sandoe
7fe8aca8a6 libsanitizer, Darwin: Restrict build to Darwin 16 or newer.
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.
2022-12-04 10:41:53 +00:00
Martin Liska
3d3b561fc3 changelog: Fix extra space after tab. 2022-11-21 10:13:44 +01:00
GCC Administrator
cdc34229c1 Daily bump. 2022-11-16 00:17:09 +00:00
Martin Liska
3037f11fb8 libsanitizer: update LOCAL_PATCHES
libsanitizer/ChangeLog:

	* LOCAL_PATCHES: Update local patches.
2022-11-15 16:45:21 +01:00
Martin Liska
0c7a928859 libsanitizer: Apply local patches 2022-11-15 16:44:59 +01:00
Martin Liska
5f3fa2655c libsanitizer: merge from upstream ae59131d3ef311fb4b1e50627c6457be00e60dc9 2022-11-15 16:44:55 +01:00
Martin Liska
3895318beb libsanitizer: use git clone --depth 1
Using depth == 1 it makes the cloning much faster.

libsanitizer/ChangeLog:

	* merge.sh: Use git clone --depth 1.
2022-11-15 14:18:27 +01:00
GCC Administrator
87f9c4a433 Daily bump. 2022-10-20 00:17:52 +00:00
Martin Liska
75f7ff1f1e libsanitizer: regenerate configure
libsanitizer/ChangeLog:

	* configure: Regenerate.
2022-10-19 08:44:43 +02:00
GCC Administrator
21de009f74 Daily bump. 2022-10-19 00:19:08 +00:00
Florian Weimer
6be2672e4e libsanitizer: Avoid implicit function declaration in configure test
libsanitizer/

	* configure.ac (sanitizer_supported): Include <unistd.h> for
	syscall prototype.
	* configure: Regenerate.
2022-10-18 16:58:48 +02:00
GCC Administrator
781f477a13 Daily bump. 2022-10-13 00:17:37 +00:00
Martin Liska
6d2294a83e regenerate configure files
Needed after a recent change.

gcc/ChangeLog:

	* configure: Regenerate.

libatomic/ChangeLog:

	* configure: Regenerate.

libbacktrace/ChangeLog:

	* configure: Regenerate.

libcc1/ChangeLog:

	* configure: Regenerate.

libffi/ChangeLog:

	* configure: Regenerate.

libgfortran/ChangeLog:

	* configure: Regenerate.

libgomp/ChangeLog:

	* configure: Regenerate.

libitm/ChangeLog:

	* configure: Regenerate.

libobjc/ChangeLog:

	* configure: Regenerate.

liboffloadmic/ChangeLog:

	* configure: Regenerate.
	* plugin/configure: Regenerate.

libphobos/ChangeLog:

	* configure: Regenerate.

libquadmath/ChangeLog:

	* configure: Regenerate.

libsanitizer/ChangeLog:

	* configure: Regenerate.

libssp/ChangeLog:

	* configure: Regenerate.

libstdc++-v3/ChangeLog:

	* configure: Regenerate.

libvtv/ChangeLog:

	* configure: Regenerate.

lto-plugin/ChangeLog:

	* configure: Regenerate.

zlib/ChangeLog:

	* configure: Regenerate.
2022-10-12 09:31:32 +02:00
GCC Administrator
ab332cd78d Daily bump. 2022-10-12 00:17:24 +00:00
Olivier Hainque
0ecd0f1cc6 Generic configury support for shared libs on VxWorks
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.
2022-10-11 07:31:07 +00:00
GCC Administrator
69fd6dcc32 Daily bump. 2022-10-04 00:17:16 +00:00
Rainer Orth
77d0627c24 libsanitizer: Fix Solaris 11.3 compilation of sanitizer_procmaps_solaris.cpp [PR105531]
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.
2022-10-03 16:28:46 +02:00
GCC Administrator
5e070cf4bd Daily bump. 2022-09-05 00:16:27 +00:00
Iain Sandoe
8b633b42af [libsanitizer] Update LOCAL_PATCHES.
Signed-off-by: Iain Sandoe <iain@sandoe.co.uk>

libsanitizer/ChangeLog:

	* LOCAL_PATCHES: Update.
2022-09-04 20:53:52 +01:00
Iain Sandoe
af9587ff0f [libsanitizer, Darwin] Fix bootstrap after recent merge.
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.
2022-09-04 20:49:01 +01:00
GCC Administrator
542c60c4fb Daily bump. 2022-09-01 00:17:39 +00:00
Xi Ruoyao
a542e4d673
libsanitizer: enable libubsan and libasan for loongarch64-*-linux*
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*.
2022-08-31 13:54:08 +08:00
GCC Administrator
3de9fb3235 Daily bump. 2022-08-31 00:16:45 +00:00
Martin Liska
70b2e511fe libsanitizer: update LOCAL_PATCHES
libsanitizer/ChangeLog:

	* LOCAL_PATCHES: Update.
2022-08-30 12:54:18 +02:00
Martin Liska
76ae5366ff libsanitizer: Apply local patches 2022-08-30 12:53:53 +02:00
Martin Liska
789573a51d libsanitizer: update build system
libsanitizer/ChangeLog:

	* sanitizer_common/Makefile.am: Remove sanitizer_openbsd.
	* sanitizer_common/Makefile.in: Regenerate.
2022-08-30 12:53:52 +02:00
Martin Liska
600413c4f3 libsanitizer: merge from master (84a71d5259c2682403cdbd8710592410a2f128ab) 2022-08-30 12:53:50 +02:00
Dimitrije Milošević
1efeaf99bd libsanitizer: Cherry-pick 2bfb0fcb51510f22723c8cdfefe from upstream
2bfb0fcb51510f22723c8cdfefe [Sanitizer][MIPS] Fix stat struct size for the O32 ABI.

Signed-off-by: Dimitrije Milosevic <dimitrije.milosevic@syrmia.com>.
2022-08-01 06:10:31 +02:00
GCC Administrator
b563a8dd3f Daily bump. 2022-07-23 00:16:27 +00:00
Rainer Orth
786e51648b libsanitizer: Fix Solaris 11.3 compilation [PR105531]
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.
2022-07-22 13:18:14 +02:00
Martin Liska
2701442d0c libsanitizer: cherry-pick 9cf13067cb5088626ba7 from upstream
9cf13067cb5088626ba7ee1ec4c42ec59c7995a0 [sanitizer] Remove #include <linux/fs.h> to resolve fsconfig_command/mount_attr conflict with glibc 2.36
2022-07-11 22:04:00 +02:00
Dimitrije Milosevic
ee915c72da
libsanitizer: Cherry-pick 5d8077565e41 from upstream
5d8077565e41: [MIPS][AddressSanitizer] Resolve build issues for the n32 ABI
2022-07-07 10:19:58 +08:00
Martin Liska
aa87b7541b libsanitizer: cherry-pick 791e0d1bc85d
791e0d1bc85d: [compiler-rt] Add NO_EXEC_STACK_DIRECTIVE on s390x
2022-06-29 15:28:07 +02:00
GCC Administrator
ab869e7f75 Daily bump. 2022-05-06 00:16:26 +00:00
H.J. Lu
a48be2e513 libsanitizer: cherry-pick commit b226894d475b from upstream
cherry-pick:

b226894d475b [sanitizer] [sanitizer] Correct GetTls for x32
2022-05-05 13:59:16 -07:00
Martin Liska
7ec6fed1e8 libsanitizer: update LOCAL_PATCHES.
libsanitizer/ChangeLog:

	* LOCAL_PATCHES: Update.
2022-05-05 13:25:16 +02:00