Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2371)

Unified Diff: content/zygote/zygote_main_linux.cc

Issue 289473002: MemorySanitizer: remove msan_unpoison_string() from zygote_main_linux.cc (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/zygote/zygote_main_linux.cc
diff --git a/content/zygote/zygote_main_linux.cc b/content/zygote/zygote_main_linux.cc
index 123296907cef7d634ac3ca6f253323b0f01ef270..e506820a9529e809b1fc8b6617c833e27e8940fa 100644
--- a/content/zygote/zygote_main_linux.cc
+++ b/content/zygote/zygote_main_linux.cc
@@ -181,17 +181,6 @@ static void InitLibcLocaltimeFunctions() {
g_libc_localtime64_r = g_libc_localtime_r;
}
-#if defined(MEMORY_SANITIZER)
-void msan_unpoison_string(const char *s) {
- if (!s) return;
- // Can't call strlen() on an uninitialized string. Instead, unpoison byte by
- // byte until the string is over.
- do {
- __msan_unpoison(s, sizeof(*s));
- } while(*(s++));
-}
-#endif
-
// Define localtime_override() function with asm name "localtime", so that all
// references to localtime() will resolve to this function. Notice that we need
// to set visibility attribute to "default" to export the symbol, as it is set
@@ -213,7 +202,7 @@ struct tm* localtime_override(const time_t* timep) {
struct tm* res = g_libc_localtime(timep);
#if defined(MEMORY_SANITIZER)
if (res) __msan_unpoison(res, sizeof(*res));
- if (res->tm_zone) msan_unpoison_string(res->tm_zone);
+ if (res->tm_zone) __msan_unpoison_string(res->tm_zone);
#endif
return res;
}
@@ -237,7 +226,7 @@ struct tm* localtime64_override(const time_t* timep) {
struct tm* res = g_libc_localtime64(timep);
#if defined(MEMORY_SANITIZER)
if (res) __msan_unpoison(res, sizeof(*res));
- if (res->tm_zone) msan_unpoison_string(res->tm_zone);
+ if (res->tm_zone) __msan_unpoison_string(res->tm_zone);
#endif
return res;
}
@@ -258,7 +247,7 @@ struct tm* localtime_r_override(const time_t* timep, struct tm* result) {
struct tm* res = g_libc_localtime_r(timep, result);
#if defined(MEMORY_SANITIZER)
if (res) __msan_unpoison(res, sizeof(*res));
- if (res->tm_zone) msan_unpoison_string(res->tm_zone);
+ if (res->tm_zone) __msan_unpoison_string(res->tm_zone);
#endif
return res;
}
@@ -279,7 +268,7 @@ struct tm* localtime64_r_override(const time_t* timep, struct tm* result) {
struct tm* res = g_libc_localtime64_r(timep, result);
#if defined(MEMORY_SANITIZER)
if (res) __msan_unpoison(res, sizeof(*res));
- if (res->tm_zone) msan_unpoison_string(res->tm_zone);
+ if (res->tm_zone) __msan_unpoison_string(res->tm_zone);
#endif
return res;
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698