[PATCH] D40853: [msan] add strtouq msan interceptor

Vitaly Buka via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Dec 5 13:56:16 PST 2017


vitalybuka created this revision.

Fixes https://github.com/google/sanitizers/issues/892


https://reviews.llvm.org/D40853

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


Index: compiler-rt/lib/msan/tests/msan_test.cc
===================================================================
--- compiler-rt/lib/msan/tests/msan_test.cc
+++ compiler-rt/lib/msan/tests/msan_test.cc
@@ -1788,6 +1788,7 @@
 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, )
Index: compiler-rt/lib/msan/msan_interceptors.cc
===================================================================
--- compiler-rt/lib/msan/msan_interceptors.cc
+++ compiler-rt/lib/msan/msan_interceptors.cc
@@ -404,6 +404,7 @@
 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(unsigned long long, strtouq, char)  // NOLINT
 
 INTERCEPTORS_STRTO(double, wcstod, wchar_t)                     // NOLINT
 INTERCEPTORS_STRTO(float, wcstof, wchar_t)                      // NOLINT
@@ -1533,6 +1534,7 @@
   INTERCEPT_STRTO(strtoul);
   INTERCEPT_STRTO(strtoll);
   INTERCEPT_STRTO(strtoull);
+  INTERCEPT_STRTO(strtouq);
   INTERCEPT_STRTO(wcstod);
   INTERCEPT_STRTO(wcstof);
   INTERCEPT_STRTO(wcstold);


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D40853.125606.patch
Type: text/x-patch
Size: 1320 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20171205/2467148f/attachment.bin>


More information about the llvm-commits mailing list