diff options
author | earthdok <earthdok@chromium.org> | 2014-12-05 12:11:04 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2014-12-05 20:11:28 +0000 |
commit | cec440607f64637a0278ad34ab3d03eb5498f89d (patch) | |
tree | d5cc5488c1c58858fc500c131995e67a9d2e744b /device/udev_linux | |
parent | 914f82d8afdb57d290f977049a06d9208af81320 (diff) | |
download | chromium_src-cec440607f64637a0278ad34ab3d03eb5498f89d.zip chromium_src-cec440607f64637a0278ad34ab3d03eb5498f89d.tar.gz chromium_src-cec440607f64637a0278ad34ab3d03eb5498f89d.tar.bz2 |
MemorySanitizer: improve the udev dynamic loading hack.
Use the unversioned symlink to ensure we always load instrumented udev.
BUG=437464, 438427
R=thestig@chromium.org, reillyg@chromium.org
Review URL: https://codereview.chromium.org/755873003
Cr-Commit-Position: refs/heads/master@{#307067}
Diffstat (limited to 'device/udev_linux')
-rw-r--r-- | device/udev_linux/udev0_loader.cc | 7 | ||||
-rw-r--r-- | device/udev_linux/udev_loader.cc | 2 |
2 files changed, 8 insertions, 1 deletions
diff --git a/device/udev_linux/udev0_loader.cc b/device/udev_linux/udev0_loader.cc index d70b2f2..9faab97 100644 --- a/device/udev_linux/udev0_loader.cc +++ b/device/udev_linux/udev0_loader.cc @@ -18,7 +18,14 @@ bool Udev0Loader::Init() { if (lib_loader_) return lib_loader_->loaded(); lib_loader_.reset(new LibUdev0Loader); +#if defined(MEMORY_SANITIZER) + // Temporary hack: rely on the symlink to pick up whichever *instrumented* + // version of libudev we have, be it libudev0 or libudev1. crbug.com/437464 + // TODO(earthdok): Remove this hack after upgrading our LKGR builders. + return lib_loader_->Load("libudev.so"); +#else return lib_loader_->Load("libudev.so.0"); +#endif } const char* Udev0Loader::udev_device_get_action(udev_device* udev_device) { diff --git a/device/udev_linux/udev_loader.cc b/device/udev_linux/udev_loader.cc index 22f709e..1a5823c 100644 --- a/device/udev_linux/udev_loader.cc +++ b/device/udev_linux/udev_loader.cc @@ -26,7 +26,7 @@ UdevLoader* UdevLoader::Get() { // 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 + // TODO(earthdok): Remove this after upgrading our MSAN LKGR builders to // Trusty. #if !defined(MEMORY_SANITIZER) udev_loader.reset(new Udev1Loader); |