[msan] add strtouq msan interceptor
authorVitaly Buka <vitalybuka@google.com>
Tue, 5 Dec 2017 22:07:26 +0000 (22:07 +0000)
committerVitaly Buka <vitalybuka@google.com>
Tue, 5 Dec 2017 22:07:26 +0000 (22:07 +0000)
Summary: Fixes https://github.com/google/sanitizers/issues/892

Reviewers: eugenis

Subscribers: llvm-commits

Differential Revision: https://reviews.llvm.org/D40853

llvm-svn: 319843

compiler-rt/lib/msan/msan_interceptors.cc
compiler-rt/lib/msan/tests/msan_test.cc

index 0b58f54b5bd2f7119e125f0844878b00c6f75da0..796b90ecad749f1ff3c4197bc3c8846c6a2d23ff 100644 (file)
@@ -404,6 +404,7 @@ INTERCEPTORS_STRTO_BASE(long, strtol, char)                  // NOLINT
 INTERCEPTORS_STRTO_BASE(long long, strtoll, char)            // NOLINT
 INTERCEPTORS_STRTO_BASE(unsigned long, strtoul, char)        // NOLINT
 INTERCEPTORS_STRTO_BASE(unsigned long long, strtoull, char)  // NOLINT
+INTERCEPTORS_STRTO_BASE(u64, strtouq, char)   // NOLINT
 
 INTERCEPTORS_STRTO(double, wcstod, wchar_t)                     // NOLINT
 INTERCEPTORS_STRTO(float, wcstof, wchar_t)                      // NOLINT
@@ -1533,6 +1534,7 @@ void InitializeInterceptors() {
   INTERCEPT_STRTO(strtoul);
   INTERCEPT_STRTO(strtoll);
   INTERCEPT_STRTO(strtoull);
+  INTERCEPT_STRTO(strtouq);
   INTERCEPT_STRTO(wcstod);
   INTERCEPT_STRTO(wcstof);
   INTERCEPT_STRTO(wcstold);
index 82d659e578372e80529898fd42319cab37db8053..c53b88b59a19024d67e868172ad74ee5206e9918 100644 (file)
@@ -1788,6 +1788,7 @@ TEST_STRTO_INT(strtol, char, )
 TEST_STRTO_INT(strtoll, char, )
 TEST_STRTO_INT(strtoul, char, )
 TEST_STRTO_INT(strtoull, char, )
+TEST_STRTO_INT(strtouq, char, )
 
 TEST_STRTO_FLOAT(strtof, char, )
 TEST_STRTO_FLOAT(strtod, char, )