[PATCH] D54527: Add new interceptor for strtonum(3)

Vitaly Buka via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Dec 7 13:15:18 PST 2018


vitalybuka accepted this revision.
vitalybuka added inline comments.
This revision is now accepted and ready to land.


================
Comment at: lib/sanitizer_common/sanitizer_common_interceptors.inc:7735
+  char *real_endptr;
+  long long ret = (long long)REAL(strtoimax)(nptr, &real_endptr, 10);
+  StrtolFixAndCheck(ctx, nptr, nullptr, real_endptr, 10);
----------------
why not strtoll, it returns the same type as interceptor and it's already used in strtonum implementation?



================
Comment at: test/sanitizer_common/TestCases/NetBSD/strtonum.cc:44
+  l = strtonum("1000.0", 1000, 1001, &errstr);
+  if (!errstr)
+    abort();
----------------
asserts?


Repository:
  rL LLVM

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D54527/new/

https://reviews.llvm.org/D54527





More information about the llvm-commits mailing list