This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH 2/17] Introduction of __asan_loadN/__asan_storeN
- From: Jakub Jelinek <jakub at redhat dot com>
- To: Yury Gribov <y dot gribov at samsung dot com>
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>, Dmitry Vyukov <dvyukov at google dot com>, Konstantin Khlebnikov <k dot khlebnikov at samsung dot com>, Andrey Ryabinin <a dot ryabinin at samsung dot com>, Viacheslav Garbuzov <v dot garbuzov at samsung dot com>
- Date: Thu, 16 Oct 2014 10:44:14 +0200
- Subject: Re: [PATCH 2/17] Introduction of __asan_loadN/__asan_storeN
- Authentication-results: sourceware.org; auth=none
- References: <543F831B dot 4090502 at samsung dot com> <543F837F dot 1040908 at samsung dot com>
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
On Thu, Oct 16, 2014 at 12:36:15PM +0400, Yury Gribov wrote:
> I disabled __asan_loadN/__asan_storeN because 4.9's Asan runtime doesn't
> support them. In a later patch I re-enable these functions specifically for
> KAsan.
> 2014-10-15 Yury Gribov <y.gribov@samsung.com>
>
> Backport from mainline
> 2014-05-30 Jakub Jelinek <jakub@redhat.com>
>
> * sanitizer.def (BUILT_IN_ASAN_REPORT_LOAD_N,
> BUILT_IN_ASAN_REPORT_STORE_N): New.
> * asan.c (struct asan_mem_ref): Change access_size type to
> HOST_WIDE_INT.
> (asan_mem_ref_init, asan_mem_ref_new, get_mem_refs_of_builtin_call,
> update_mem_ref_hash_table): Likewise.
> (asan_mem_ref_hasher::hash): Hash in a HWI.
> (report_error_func): Change size_in_bytes argument to HWI.
> Use *_N builtins if size_in_bytes is larger than 16 or not power of
> two.
> (build_shadow_mem_access): New function.
> (build_check_stmt): Use it. Change size_in_bytes argument to HWI.
> Handle size_in_bytes not power of two or larger than 16.
> (instrument_derefs): Don't give up if size_in_bytes is not
> power of two or is larger than 16.
Ok.
Jakub