llvm-project/compiler-rt/lib
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
..
BlocksRuntime [compiler-rt] Test commit: remove some trailing white spaces. 2017-08-25 19:36:30 +00:00
asan [NFC][compiler-rt][test] Fully qualify string -> std::string 2020-02-19 08:59:26 -08:00
builtins [builtins] Build for arm64e for Darwin 2020-03-11 22:01:44 -07:00
cfi Improve error message when '=' is missing in {ASAN,...}_OPTIONS. 2019-06-15 01:37:14 +00:00
crt [cmake] Strip quotes in compiler-rt/lib/crt; error if checks fail 2020-03-09 15:52:39 -07:00
dfsan [compiler-rt] Remove some cpplint filters 2019-09-12 02:20:36 +00:00
fuzzer [compiler-rt] Add ConsumeRandomLengthString() version without arguments. 2020-03-23 16:32:37 -07:00
gwp_asan [GWP-ASan] Only pack frames that are stored. 2020-03-24 14:37:09 -07:00
hwasan hwasan_symbolize: allow 0x in the address field 2020-02-03 18:23:48 -08:00
interception Fix check-interception link error in compiler-rt debug mode 2019-10-10 23:30:54 +00:00
lsan [lsan] Support LeakSanitizer runtime on Fuchsia 2020-01-28 11:34:53 -08:00
msan [compiler-rt] Intercept the uname() function 2020-03-23 12:59:38 -07:00
profile [profile] Record the profile size as a property of the VMO 2020-03-19 16:22:19 -07:00
safestack compiler-rt: Rename .cc file in lib/{interception/tests,safestack} to .cpp 2019-08-01 13:56:52 +00:00
sanitizer_common 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
scudo scudo: Create a public include directory. NFCI. 2020-03-23 18:23:29 -07:00
stats compiler-rt: Rename .cc file in lib/{dfsan,stats,ubsan_minimal} to .cpp 2019-08-01 12:41:23 +00:00
tsan tsan: Adding releaseAcquire() to ThreadClock 2020-03-24 11:27:46 +01:00
ubsan [ubsan] Add support for -fsanitize=nullability-* suppressions 2020-02-28 14:30:40 -08:00
ubsan_minimal compiler-rt: Rename .cc file in lib/{dfsan,stats,ubsan_minimal} to .cpp 2019-08-01 12:41:23 +00:00
xray [XRay] Record the XRay data size as a property of the VMO 2020-03-19 19:01:05 -07:00
CMakeLists.txt Reland "[compiler-rt] Simple crtbegin.o and crtend.o implementation" 2019-04-30 18:13:22 +00:00