> >You lose detection of libc usage errors (like strchr() on an 
> >unaddressable buffer, etc). 
>

This explain seems reasonable, but I tested libsqlite.so with asan just 
now, *got an Asan error that about memcmp*, see below, strange... It should 
not be detected, Why this happen?

~/codes/gcc-linaro-arm-linux-gnueabihf-4.8-2014.04_linux/bin/arm-linux-gnueabihf-ldd
 
--root=/home/ libsqlite.so
        libdl.so not found
        liblog.so not found
        libicuuc.so not found
        libicui18n.so not found
        libutils.so not found
        libc.so not found
        libstdc++.so not found
        libm.so not found
        libasan.so.1 not found

==2722==ERROR: AddressSanitizer: global-buffer-overflow on address 
0x409e32a9 at pc 0x409ccc59 bp 0xbed53abc sp 0xbed53ab4
READ of size 1 at 0x409e32a9 thread T0
#0 0x409ccc57 (/system/lib/libsqlite.so+0xd5c57)
#1 0x409684db (/system/lib/libsqlite.so+0x714db)
...
... ...
0x409e32a9 is located 55 bytes to the left of global variable '*.LC1241' 
from 'external/sqlite/dist/sqlite3.c' (0x409e32e0) of size 10
'*.LC1241' is ascii string 'unix-none'
0x409e32a9 is located 4 bytes to the right of global variable '*.LC1240' 
from 'external/sqlite/dist/sqlite3.c' (0x409e32a0) of size 5
'*.LC1240' is ascii string 'unix'

The error code is in the sqlite3.c:
  if(* memcmp*(pVfs->zName,"unix-excl",10)==0 ){
    pNew->ctrlFlags |= UNIXFILE_EXCL;
  }

-- 
You received this message because you are subscribed to the Google Groups 
"address-sanitizer" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to