diff options
author | jln@chromium.org <jln@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-02-12 00:06:53 +0000 |
---|---|---|
committer | jln@chromium.org <jln@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-02-12 00:06:53 +0000 |
commit | c17a89521f2219f7a806b9bad8adaf323d2b4165 (patch) | |
tree | 829a4dcf3005f5d8bd5af64fc1988d59f870dfb2 /content/zygote | |
parent | 3adcf778d5bf8681e6436b7fad87ac9a2e169c40 (diff) | |
download | chromium_src-c17a89521f2219f7a806b9bad8adaf323d2b4165.zip chromium_src-c17a89521f2219f7a806b9bad8adaf323d2b4165.tar.gz chromium_src-c17a89521f2219f7a806b9bad8adaf323d2b4165.tar.bz2 |
Revert 250320 "Make the libc overrides in zygote_main_linux.cc s..."
> Make the libc overrides in zygote_main_linux.cc sanitizer-friendly.
>
> Previosly they would bypass sanitizer interceptors and call the libc
> implementations directly. No bueno.
>
> BUG=123263
> R=jln@chromium.org
>
> Review URL: https://codereview.chromium.org/158833004
TBR=earthdok@chromium.org
Review URL: https://codereview.chromium.org/159393003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@250563 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/zygote')
-rw-r--r-- | content/zygote/zygote_main_linux.cc | 24 |
1 files changed, 5 insertions, 19 deletions
diff --git a/content/zygote/zygote_main_linux.cc b/content/zygote/zygote_main_linux.cc index 43098b6..c776fed 100644 --- a/content/zygote/zygote_main_linux.cc +++ b/content/zygote/zygote_main_linux.cc @@ -145,29 +145,15 @@ static LocaltimeFunction g_libc_localtime64; static LocaltimeRFunction g_libc_localtime_r; static LocaltimeRFunction g_libc_localtime64_r; -static void* RealOrSanitizedFunction(const char* function_name) { -#if defined(ADDRESS_SANITIZER) || defined(MEMORY_SANITIZER) || \ - defined(THREAD_SANITIZER) || defined(LEAK_SANITIZER) - // If the sanitizer tool defines an interceptor for this function, we want our - // calls to go through the interceptor rather than directly to the libc - // implementation. - std::string interceptor_name("__interceptor_"); - interceptor_name.append(function_name); - void* interceptor = dlsym(RTLD_DEFAULT, interceptor_name.c_str()); - if (interceptor) return interceptor; -#endif - return dlsym(RTLD_NEXT, function_name); -} - static void InitLibcLocaltimeFunctions() { g_libc_localtime = reinterpret_cast<LocaltimeFunction>( - RealOrSanitizedFunction("localtime")); - g_libc_localtime_r = reinterpret_cast<LocaltimeRFunction>( - RealOrSanitizedFunction("localtime_r")); + dlsym(RTLD_NEXT, "localtime")); g_libc_localtime64 = reinterpret_cast<LocaltimeFunction>( - RealOrSanitizedFunction("localtime64")); + dlsym(RTLD_NEXT, "localtime64")); + g_libc_localtime_r = reinterpret_cast<LocaltimeRFunction>( + dlsym(RTLD_NEXT, "localtime_r")); g_libc_localtime64_r = reinterpret_cast<LocaltimeRFunction>( - RealOrSanitizedFunction("localtime64_r")); + dlsym(RTLD_NEXT, "localtime64_r")); if (!g_libc_localtime || !g_libc_localtime_r) { // http://code.google.com/p/chromium/issues/detail?id=16800 |