This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: RFC Asan instrumentation control
- From: Jakub Jelinek <jakub at redhat dot com>
- To: Maxim Ostapenko <m dot ostapenko at partner dot samsung dot com>
- Cc: Yury Gribov <y dot gribov at samsung dot com>, Konstantin Serebryany <konstantin dot s dot serebryany at gmail dot com>, GCC Patches <gcc-patches at gcc dot gnu dot org>, Viacheslav Garbuzov <v dot garbuzov at samsung dot com>
- Date: Fri, 27 Dec 2013 11:39:25 +0100
- Subject: Re: RFC Asan instrumentation control
- Authentication-results: sourceware.org; auth=none
- References: <CAGQ9bdx9=T7jreZLTf2o=2PiSr1HAft-7E6nFrhyei59LV_Zag at mail dot gmail dot com> <52A1CCE0 dot 40307 at samsung dot com> <CAGQ9bdyyqqW0nibRHnqSCVe4XdahaipVQJBbKhFfEoAJLtUZ4w at mail dot gmail dot com> <52A1D1E3 dot 1040200 at samsung dot com> <52B18887 dot 9080605 at partner dot samsung dot com> <20131218115930 dot GX892 at tucnak dot redhat dot com> <52B2DFA0 dot 8090800 at partner dot samsung dot com> <52B2E067 dot 2050308 at partner dot samsung dot com> <20131219122719 dot GT892 at tucnak dot redhat dot com> <52B95DB1 dot 3090506 at partner dot samsung dot com>
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
On Tue, Dec 24, 2013 at 02:10:57PM +0400, Maxim Ostapenko wrote:
> >As for the tests, I'm afraid I don't like them at all.
> >If anything, it ought to be dg-do compile tests where you say
> >scan assembly or some dump, but having runtime testcases that
> >trigger undefined behavior that isn't detected by the instrumentation
> >library at all and expect them to "pass" is simply wrong.
> >
> Got it, converted all tests except no-asan-stack.c, because i failed
> to discover how to grep for stack
> instrumentation. Perhaps memcmp of random data is fine?
It is still undefined behavior, IMNSHO it is far better to just change those
tests into compile time tests and verify assembly using dg-final
scan-assembler. Say verify that __asan_option_detect_stack_use_after_return
isn't present for the no-use-after-return test, or __asan_report_store
resp. __asan_report_load isn't present, or __asan_register_globals
etc.
Jakub