[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:49:39 PST 2018
vitalybuka added inline comments.
================
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);
----------------
krytarowski wrote:
> vitalybuka wrote:
> > why not strtoll, it returns the same type as interceptor and it's already used in strtonum implementation?
> >
> It doesn't build, as strtoll isn't a valid interceptor for all sanitizers.
Ah right, to call REAL we need interceptor or some workaround.
LGTM as is, but we should move these from asan/msan to common at some point
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