This is the mail archive of the
mailing list for the GCC project.
Re: [PATCH] Don't expand string/memory builtins if ASan is enabled.
- From: Jakub Jelinek <jakub at redhat dot com>
- To: Yury Gribov <y dot gribov at samsung dot com>
- Cc: Maxim Ostapenko <m dot ostapenko at partner dot samsung dot com>, GCC Patches <gcc-patches at gcc dot gnu dot org>, Slava Garbuzov <v dot garbuzov at samsung dot com>, Maxim Ostapenko <chefmax7 at gmail dot com>
- Date: Fri, 17 Oct 2014 15:03:40 +0200
- Subject: Re: [PATCH] Don't expand string/memory builtins if ASan is enabled.
- Authentication-results: sourceware.org; auth=none
- References: <5441008A dot 2010706 at partner dot samsung dot com> <54410170 dot 9030100 at partner dot samsung dot com> <20141017122420 dot GR10376 at tucnak dot redhat dot com> <5441132D dot 8000500 at samsung dot com>
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
On Fri, Oct 17, 2014 at 05:01:33PM +0400, Yury Gribov wrote:
> On 10/17/2014 04:24 PM, Jakub Jelinek wrote:
> >>+/* Returns TRUE if given FCODE corresponds to string or memory builtin function.
> >>+ */
> >>+static inline bool
> >>+is_memory_builtin (enum built_in_function fcode)
> >>+ return fcode <= BUILT_IN_STRSTR && fcode >= BUILT_IN_BCMP;
> >This is too fragile and ugly.
> >IMHO you should list (supposedly not in a special inline, but directly
> >where you use it) in a switch all the builtins you don't want to expand.
> We already do this for BUILT_IN_ASAN_REPORT_LOAD1 ... BUILT_IN_ASAN_STOREN
I know, but it is still a coherent sent of builtins for very similar
purposes, many of them sorted by increasing size number.
> but I agree that this one is more ugly.
The memops builtins are just random bag of them, it is expected many people
will add builtins into that range and outside of that range.