On Wed, Jul 15, 2015 at 8:43 PM, Richard Hipp <drh at sqlite.org> wrote: > On 7/15/15, T?r?k Edwin <edwin+sqlite3 at etorok.net> wrote: >> On 07/15/2015 08:34 PM, T?r?k Edwin wrote: >> >> In fact such detection could be added to fuzzcheck.c too (I didn't know that >> you can detect presence of address sanitizer at compile time until now): > > It's a clever idea. I'm not so sure I want to add this to fuzzcheck. > I think I'd like to have the ability to get ASAN to fail using > fuzzcheck.
Not only asan can be detected at runtime, but asan also provides an API to ?poison? memory regions: https://code.google.com/p/address-sanitizer/wiki/ManualPoisoning It could be useful for SQLite. For example, SQLite could use the API to poison: - memory not used in MEMSYS5 buffer provided by sqlite3_config(SQLITE_CONFIG_HEAP, ...). - unused lookaside buffers - unused scratch buffers Regards Dominique