This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] asan testsuite (take 3)
On Nov 14, 2012, at 8:22 AM, Jakub Jelinek <jakub@redhat.com> wrote:
> On Wed, Nov 14, 2012 at 12:11:13PM +0100, Jakub Jelinek wrote:
>> Anyway, once asan_symbolize actually symbolizes the output, we could use
>> something like:
>> /* { dg-output "ERROR: AddressSanitizer stack-buffer-overflow.*" } */
>> /* { dg-output " #0 0x\[0-9a-f\]+ (in _*(interceptor_|)memcmp |\[(\])\[^\n\r]*(\n|\r\n|\r)" } */
>> /* { dg-output " #1 0x\[0-9a-f\]+ (in _*main|\[(\])\[^\n\r]*(\n|\r\n|\r)" } */
>> (this way it will check function names if symbolizer was actually
>> successful, and just accept #0 0xdeadbeef (foobarbaz.so+0xbeef) style
>> if it wasn't), but will not accept other function names in the backtrace.
>
> Here it is even with symbolizer, written in (poor) tcl. It will pass even
> if e.g. addr2line is replaced by a script that always fails, but if it
> succeeds, will fail if the dg-output regexps contain different function name
> than what is actually emitted.
>
> Ok for trunk?
Ok. If others would like to improve this… :-) feel free to step forward.