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.

>
> Index: test/fuzzcheck.c
> ==================================================================
> --- test/fuzzcheck.c
> +++ test/fuzzcheck.c
> @@ -737,10 +737,19 @@
>    char *zDbName = "";          /* Appreviated name of a source database */
>    const char *zFailCode = 0;   /* Value of the TEST_FAILURE environment
> variable */
>    int cellSzCkFlag = 0;        /* --cell-size-check */
>    int sqlFuzz = 0;             /* True for SQL fuzz testing. False for DB
> fuzz */
>    int iTimeout = 120;          /* Default 120-second timeout */
> +
> +#if defined(__has_feature)
> +# if __has_feature(address_sanitizer)
> +  cellSzCkFlag = 1;
> +# endif
> +#endif
> +#ifdef __SANITIZE_ADDRESS__
> +  cellSzCkFlag = 1;
> +#endif
>
>    iBegin = timeOfDay();
>  #ifdef __unix__
>    signal(SIGALRM, timeoutHandler);
>  #endif
>
>
>
> _______________________________________________
> sqlite-users mailing list
> sqlite-users at mailinglists.sqlite.org
> http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
>


-- 
D. Richard Hipp
drh at sqlite.org

Reply via email to