Jakub Jelinek <[email protected]> writes:
> Ok for trunk (the patch is on top of the tsan patch)?
>
> 2012-11-22 Jakub Jelinek <[email protected]>
>
> * sanitizer.def: Add Address Sanitizer builtins.
> Rename BUILT_IN_TSAN_READ_* to BUILT_IN_TSAN_READ* and
> BUILT_IN_TSAN_WRITE_* to BUILT_IN_TSAN_WRITE*.
> * Makefile.in (asan.o): Depend on langhooks.h.
> (tsan.o): Depend on asan.h.
> * asan.h (initialize_sanitizer_builtins): New prototype.
> * asan.c: Include langhooks.h.
> (report_error_func): Use builtin_decl_implicit of corresponding
> BUILT_IN_ASAN_REPORT_{LOAD,STORE}*.
> (asan_init_func): Removed.
> (initialize_sanitizer_builtins): New function.
> (asan_finish_file): Call it. Use builtin_decl_implicit
> on BUILT_IN_ASAN_{INIT,{,UN}REGISTER_GLOBALS}.
> (asan_instrument): Call initialize_sanitizer_builtins.
> * builtins.def (DEF_SANITIZER_BUILTIN): Change condition to
> (flag_asan || flag_tsan).
> * tsan.c: Include asan.h and tsan.h.
> (get_memory_access_decl): Rename BUILT_IN_TSAN_{READ,WRITE}_*
> to BUILT_IN_TSAN_{READ,WRITE}*.
> (tsan_pass): Call initialize_sanitizer_builtins.
> (tsan_gate, tsan_gate_O0): Don't check if
> builtin_decl_implicit_p (BUILT_IN_TSAN_INIT) is true.
> (tsan_finish_file): Call initialize_sanitizer_builtins.
> * builtin-types.def (BT_FN_VOID_PTR_PTRMODE): New fn type.
>
> --- gcc/sanitizer.def.jj 2012-11-22 13:17:24.000000000 +0100
> +++ gcc/sanitizer.def 2012-11-22 15:45:55.873655417 +0100
> @@ -1,3 +1,34 @@
> +/* Address Sanitizer */
Maybe we could use some introductory comment at the beginning of this
file, a bit like what we have for sync-builtins.def. I think this kind
of comments are a great asset for people who are new to the file.
Otherwise, the asan parts of the patch looks OK to me.
Thanks.
--
Dodji