aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristopher Ferris <cferris@google.com>2019-05-09 13:27:02 -0700
committerChristopher Ferris <cferris@google.com>2019-05-31 14:55:38 -0700
commit6e2b6aa89ee121342d2aa735cab6369992e47f86 (patch)
tree79a6a713757e6fd29aff44a8aeeab03fcbfc2a46
parent7b8a567f44b3fdb30eac8211e8ed8e27fb162797 (diff)
downloadbuild_soong-6e2b6aa89ee121342d2aa735cab6369992e47f86.tar.gz
build_soong-6e2b6aa89ee121342d2aa735cab6369992e47f86.tar.bz2
build_soong-6e2b6aa89ee121342d2aa735cab6369992e47f86.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 Merged-In: Ie55a0414088787ec11d85fffcb04592ed4f23c57 (cherry picked from commit 753d4a69d55bf7492e3c4bf193c3a906dcb23535)
-rw-r--r--cc/sanitize.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/cc/sanitize.go b/cc/sanitize.go
index 89ef7e61..b7a36a60 100644
--- a/cc/sanitize.go
+++ b/cc/sanitize.go
@@ -393,6 +393,11 @@ func (sanitize *sanitize) deps(ctx BaseModuleContext, deps Deps) Deps {
if ctx.Device() {
if Bool(sanitize.Properties.Sanitize.Address) {
deps.StaticLibs = append(deps.StaticLibs, asanLibs...)
+ // Compiling asan and having libc_scudo in the same
+ // executable will cause the executable to crash.
+ // Remove libc_scudo since it is only used to override
+ // allocation functions which asan already overrides.
+ _, deps.SharedLibs = removeFromList("libc_scudo", deps.SharedLibs)
}
}