diff options
author | thestig <thestig@chromium.org> | 2014-12-02 15:48:37 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2014-12-02 23:48:56 +0000 |
commit | ef7b79065bed0e271e997fe2c002c5d16159f836 (patch) | |
tree | 267b5da820956c603d3edede21e77b1333f217aa /device/udev_linux | |
parent | 485a6eb334bb4569da57d274b2eb3fafd440fb95 (diff) | |
download | chromium_src-ef7b79065bed0e271e997fe2c002c5d16159f836.zip chromium_src-ef7b79065bed0e271e997fe2c002c5d16159f836.tar.gz chromium_src-ef7b79065bed0e271e997fe2c002c5d16159f836.tar.bz2 |
Linux / MSAN: Add a hack to prevent accidentally loading an uninstrumented libudev library.
BUG=437464
Review URL: https://codereview.chromium.org/772183002
Cr-Commit-Position: refs/heads/master@{#306492}
Diffstat (limited to 'device/udev_linux')
-rw-r--r-- | device/udev_linux/udev_loader.cc | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/device/udev_linux/udev_loader.cc b/device/udev_linux/udev_loader.cc index 88b64e1..22f709e 100644 --- a/device/udev_linux/udev_loader.cc +++ b/device/udev_linux/udev_loader.cc @@ -22,11 +22,19 @@ UdevLoader* UdevLoader::Get() { return g_udev_loader; scoped_ptr<UdevLoader> udev_loader; + // This is an ugly hack to get around the fact that a MSAN build on Precise + // will only build an instrumented copy of libudev0 and not libudev1. If one + // runs the binary on Trusty, it will end up loading an uninstrumented + // libudev1 at run time. http://crbug.com/437464 + // TODO(thestig): Remove this after upgrading our MSAN LKGR builders to + // Trusty. +#if !defined(MEMORY_SANITIZER) udev_loader.reset(new Udev1Loader); if (udev_loader->Init()) { g_udev_loader = udev_loader.release(); return g_udev_loader; } +#endif udev_loader.reset(new Udev0Loader); if (udev_loader->Init()) { |