Commit cec44060 authored by earthdok's avatar earthdok Committed by Commit bot

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}
parent 914f82d8
......@@ -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) {
......
......@@ -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);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment