This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] asan testsuite (take 3)


On Wed, Nov 14, 2012 at 11:12:05AM -0800, Mike Stump wrote:
> 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.

FYI, this testcase produces 24 passes in gcc and g++ on x86_64-apple-darwin12
using the proposed fix for mach_override/mach_override.c from comment 28 of
PR55289. So libsanitizer looks in reasonable shape to enable on darwin once
someone imports mach_override/mach_override.c and mach_override/mach_override.h
from llvm and commits the build patch (http://gcc.gnu.org/ml/gcc-patches/2012-11/msg01119.html).
           Jack


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]