diff options
author | Christopher Ferris | 2019-05-09 15:27:02 -0500 |
---|---|---|
committer | Christopher Ferris | 2019-05-09 15:35:37 -0500 |
commit | 753d4a69d55bf7492e3c4bf193c3a906dcb23535 (patch) | |
tree | 68d5d97f3dfed46e2d51b3528fe142c1a85e2826 | |
parent | 11cd91dada4c6d789d1636ecdf51f3106bc10c4f (diff) | |
download | platform-build-soong-753d4a69d55bf7492e3c4bf193c3a906dcb23535.tar.gz platform-build-soong-753d4a69d55bf7492e3c4bf193c3a906dcb23535.tar.xz platform-build-soong-753d4a69d55bf7492e3c4bf193c3a906dcb23535.zip |
Remove libc_scudo library when building asan.
Running any executable built with asan and libc_scudo results in crashes.
Bug: 131810078
Test: Built the media processes with the sanitizer enabled verifying
Test: that the libc_scudo.so shared library is not listed in the
Test: mediaextractor and the mediaswcodec binaries.
Test: Build the media processes without the sanitizer enabled verifying
Test: that the libc_scudo.so shared library is listed in the
Test: mediaextractor and the mediaswcodec binaries.
Change-Id: Ie55a0414088787ec11d85fffcb04592ed4f23c57
-rw-r--r-- | cc/sanitize.go | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/cc/sanitize.go b/cc/sanitize.go index 2d80c221..14c14189 100644 --- a/cc/sanitize.go +++ b/cc/sanitize.go | |||
@@ -392,6 +392,11 @@ func (sanitize *sanitize) deps(ctx BaseModuleContext, deps Deps) Deps { | |||
392 | if ctx.Device() { | 392 | if ctx.Device() { |
393 | if Bool(sanitize.Properties.Sanitize.Address) { | 393 | if Bool(sanitize.Properties.Sanitize.Address) { |
394 | deps.StaticLibs = append(deps.StaticLibs, asanLibs...) | 394 | deps.StaticLibs = append(deps.StaticLibs, asanLibs...) |
395 | // Compiling asan and having libc_scudo in the same | ||
396 | // executable will cause the executable to crash. | ||
397 | // Remove libc_scudo since it is only used to override | ||
398 | // allocation functions which asan already overrides. | ||
399 | _, deps.SharedLibs = removeFromList("libc_scudo", deps.SharedLibs) | ||
395 | } | 400 | } |
396 | } | 401 | } |
397 | 402 | ||