gcc/libsanitizer/asan
Rainer Orth 7c6071a66f libsanitizer: Intercept __makecontext_v2 on Solaris/SPARC [PR113785]
c-c++-common/asan/swapcontext-test-1.c FAILs on Solaris/SPARC:

FAIL: c-c++-common/asan/swapcontext-test-1.c   -O0  execution test
FAIL: c-c++-common/asan/swapcontext-test-1.c   -O1  execution test
FAIL: c-c++-common/asan/swapcontext-test-1.c   -O2  execution test
FAIL: c-c++-common/asan/swapcontext-test-1.c   -O2 -flto  execution test
FAIL: c-c++-common/asan/swapcontext-test-1.c -O2 -flto -flto-partition=none
execution test
FAIL: c-c++-common/asan/swapcontext-test-1.c -O3 -fomit-frame-pointer
-funroll-loops -fpeel-loops -ftracer -finline-functions execution test
FAIL: c-c++-common/asan/swapcontext-test-1.c   -O3 -g  execution test
FAIL: c-c++-common/asan/swapcontext-test-1.c   -Os  execution test

As detailed in PR sanitizer/113785, this happens because an ABI change
in Solaris 10/SPARC caused the external symbol for makecontext to be
changed to __makecontext_v2, which isn't intercepted.

The following patch, submitted upstream at
https://github.com/llvm/llvm-project/pull/81588, fixes that.

Tested on sparc-sun-solaris2.11 and i386-pc-solaris2.11.

2024-02-16  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>

	libsanitizer:
	PR sanitizer/113785
	* asan/asan_interceptors.cpp: Cherry-pick llvm-project revision
	8c2033719a843a1880427a5e8caa5563248bce78.
2024-02-16 14:06:24 +01:00
..
asan_activation_flags.inc
asan_activation.cpp
asan_activation.h
asan_allocator.cpp
asan_allocator.h
asan_debugging.cpp
asan_descriptions.cpp
asan_descriptions.h
asan_errors.cpp
asan_errors.h
asan_fake_stack.cpp
asan_fake_stack.h
asan_flags.cpp
asan_flags.h
asan_flags.inc
asan_fuchsia.cpp
asan_globals_win.cpp
asan_globals.cpp
asan_init_version.h
asan_interceptors_memintrinsics.cpp
asan_interceptors_memintrinsics.h
asan_interceptors_vfork.S
asan_interceptors.cpp
asan_interceptors.h
asan_interface_internal.h
asan_interface.inc
asan_internal.h
asan_linux.cpp
asan_lock.h
asan_mac.cpp
asan_malloc_linux.cpp
asan_malloc_mac.cpp
asan_malloc_win.cpp
asan_mapping_sparc64.h
asan_mapping.h
asan_memory_profile.cpp
asan_new_delete.cpp
asan_poisoning.cpp
asan_poisoning.h
asan_posix.cpp
asan_preinit.cpp
asan_premap_shadow.cpp
asan_premap_shadow.h
asan_report.cpp
asan_report.h
asan_rtl_static.cpp
asan_rtl_x86_64.S
asan_rtl.cpp
asan_scariness_score.h
asan_shadow_setup.cpp
asan_stack.cpp
asan_stack.h
asan_stats.cpp
asan_stats.h
asan_suppressions.cpp
asan_suppressions.h
asan_thread.cpp
asan_thread.h
asan_win_dll_thunk.cpp
asan_win_dynamic_runtime_thunk.cpp
asan_win_weak_interception.cpp
asan_win.cpp
libtool-version
Makefile.am
Makefile.in