[PATCH] D54081: Add new interceptor for atof(3)
    Kamil Rytarowski via Phabricator via llvm-commits 
    llvm-commits at lists.llvm.org
       
    Mon Nov  5 06:23:08 PST 2018
    
    
  
krytarowski added inline comments.
================
Comment at: lib/sanitizer_common/sanitizer_common_interceptors.inc:7260
+  if (nptr)
+    COMMON_INTERCEPTOR_READ_RANGE(ctx, nptr, REAL(strlen)(nptr) + 1);
+  return REAL(atof)(nptr);
----------------
vitalybuka wrote:
> atof does not scan full string
Right, I will handle it differently.
================
Comment at: test/sanitizer_common/TestCases/NetBSD/atof.cc:7
+int main(void) {
+  double d;
+
----------------
vitalybuka wrote:
> shouldn't it be a Posix test?
It's standard C interface, but I defer porting it to other OSes to others.
Repository:
  rL LLVM
https://reviews.llvm.org/D54081
    
    
More information about the llvm-commits
mailing list