llvm-project/compiler-rt/lib/sanitizer_common/tests
Dan Liew b684c1a50f Add a `Symbolizer::GetEnvP()` method that allows symbolizer implementations to customise the environment of the symbolizer binary.
Summary:
This change introduces the `Symbolizer::GetEnvP()` method that returns a
pointer to environment array used for spawning the symbolizer process.
The motivation is to allow implementations to customise the environment
if required.  The default implementation just returns
`__sanitizer::GetEnviron()` which (provided it's implemented) should
preserve the existing behaviours of the various implementations.

This change has been plumbed through the `internal_spawn(...)` and
`StartSubprocess(...)` process spawning implementations.

For the `StartSubprocess()` implementation we need to call `execve()`
rather than `execv()` to pass the environment. However, it appears that
`internal_execve(...)` exists in sanitizer_common so this patch use that
which seems like a nice clean up.

Support in the Windows implementation of
`SymbolizerProcess:StartSymbolizerSubprocess()` has not been added
because the Windows sanitizer runtime doesn't implement `GetEnviron()`.

rdar://problem/58789439

Reviewers: kubamracek, yln, dvyukov, vitalybuka, eugenis, phosek, aizatsky, rnk

Subscribers: #sanitizers, llvm-commits

Tags: #sanitizers

Differential Revision: https://reviews.llvm.org/D76666
2020-03-24 15:41:46 -07:00
..
CMakeLists.txt [sanitizer] Link Sanitizer-x86_64-Test-Nolibc with -static 2019-12-27 15:25:08 -08:00
malloc_stress_transfer_test.cpp compiler-rt: Try to appease lint script. 2019-07-31 23:34:07 +00:00
sanitizer_allocator_test.cpp [SanitizerCommon] Reduce wasting memory in LowLevelAllocator. 2019-12-11 12:44:55 +07:00
sanitizer_allocator_testlib.cpp compiler-rt: Rename .cc file in lib/sanitizer_common/tests to .cpp 2019-07-31 19:11:14 +00:00
sanitizer_atomic_test.cpp compiler-rt: Rename .cc file in lib/sanitizer_common/tests to .cpp 2019-07-31 19:11:14 +00:00
sanitizer_bitvector_test.cpp Fix warning: format specifies type 'unsigned long' but the argument has type 'unsigned long long' [-Wformat] 2019-11-04 14:42:07 -05:00
sanitizer_bvgraph_test.cpp compiler-rt: Rename .cc file in lib/sanitizer_common/tests to .cpp 2019-07-31 19:11:14 +00:00
sanitizer_common_test.cpp [sanitizer] Construct InternalMmapVector without memory allocation. 2019-12-17 15:03:23 +07:00
sanitizer_deadlock_detector_test.cpp compiler-rt: Rename .cc file in lib/sanitizer_common/tests to .cpp 2019-07-31 19:11:14 +00:00
sanitizer_flags_test.cpp compiler-rt: Rename .cc file in lib/sanitizer_common/tests to .cpp 2019-07-31 19:11:14 +00:00
sanitizer_format_interceptor_test.cpp compiler-rt: Rename .cc file in lib/sanitizer_common/tests to .cpp 2019-07-31 19:11:14 +00:00
sanitizer_ioctl_test.cpp compiler-rt: Rename .cc file in lib/sanitizer_common/tests to .cpp 2019-07-31 19:11:14 +00:00
sanitizer_libc_test.cpp Remove NOLINTs from compiler-rt 2019-09-11 23:19:48 +00:00
sanitizer_linux_test.cpp Add a `Symbolizer::GetEnvP()` method that allows symbolizer implementations to customise the environment of the symbolizer binary. 2020-03-24 15:41:46 -07:00
sanitizer_list_test.cpp compiler-rt: Rename .cc file in lib/sanitizer_common/tests to .cpp 2019-07-31 19:11:14 +00:00
sanitizer_mutex_test.cpp compiler-rt: Rename .cc file in lib/sanitizer_common/tests to .cpp 2019-07-31 19:11:14 +00:00
sanitizer_nolibc_test.cpp compiler-rt: Rename .cc file in lib/sanitizer_common/tests to .cpp 2019-07-31 19:11:14 +00:00
sanitizer_nolibc_test_main.cpp compiler-rt: Rename .cc file in lib/sanitizer_common/tests to .cpp 2019-07-31 19:11:14 +00:00
sanitizer_posix_test.cpp [sanitizer_common][tests] Fix SanitizerCommon-Unit :: ./Sanitizer-*-Test/SanitizerCommon.PthreadDestructorIterations on Solaris 2019-08-02 18:55:22 +00:00
sanitizer_printf_test.cpp [compiler-rt] Remove some cpplint filters 2019-09-12 02:20:36 +00:00
sanitizer_procmaps_test.cpp compiler-rt: Rename .cc file in lib/sanitizer_common/tests to .cpp 2019-07-31 19:11:14 +00:00
sanitizer_pthread_wrappers.h [sanitizer] Fix warning on windows 2020-03-16 19:17:03 -07:00
sanitizer_quarantine_test.cpp compiler-rt: Rename .cc file in lib/sanitizer_common/tests to .cpp 2019-07-31 19:11:14 +00:00
sanitizer_ring_buffer_test.cpp compiler-rt: Rename .cc file in lib/sanitizer_common/tests to .cpp 2019-07-31 19:11:14 +00:00
sanitizer_stackdepot_test.cpp compiler-rt: Rename .cc file in lib/sanitizer_common/tests to .cpp 2019-07-31 19:11:14 +00:00
sanitizer_stacktrace_printer_test.cpp compiler-rt: Rename .cc file in lib/sanitizer_common/tests to .cpp 2019-07-31 19:11:14 +00:00
sanitizer_stacktrace_test.cpp compiler-rt: Rename .cc file in lib/sanitizer_common/tests to .cpp 2019-07-31 19:11:14 +00:00
sanitizer_stoptheworld_test.cpp compiler-rt: Rename .cc file in lib/sanitizer_common/tests to .cpp 2019-07-31 19:11:14 +00:00
sanitizer_stoptheworld_testlib.cpp compiler-rt: Rename .cc file in lib/sanitizer_common/tests to .cpp 2019-07-31 19:11:14 +00:00
sanitizer_suppressions_test.cpp [compiler-rt] Remove some cpplint filters 2019-09-12 02:20:36 +00:00
sanitizer_symbolizer_test.cpp compiler-rt: Rename .cc file in lib/sanitizer_common/tests to .cpp 2019-07-31 19:11:14 +00:00
sanitizer_test_config.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
sanitizer_test_main.cpp compiler-rt: Rename .cc file in lib/sanitizer_common/tests to .cpp 2019-07-31 19:11:14 +00:00
sanitizer_test_utils.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
sanitizer_thread_registry_test.cpp compiler-rt: Rename .cc file in lib/sanitizer_common/tests to .cpp 2019-07-31 19:11:14 +00:00
sanitizer_type_traits_test.cpp compiler-rt: Rename .cc file in lib/sanitizer_common/tests to .cpp 2019-07-31 19:11:14 +00:00
sanitizer_vector_test.cpp compiler-rt: Rename .cc file in lib/sanitizer_common/tests to .cpp 2019-07-31 19:11:14 +00:00
standalone_malloc_test.cpp compiler-rt: Rename .cc file in lib/sanitizer_common/tests to .cpp 2019-07-31 19:11:14 +00:00