Patchwork [libsanitizer] merge fresh sources from upstream

login
register
mail settings
Submitter Jakub Jelinek
Date Nov. 23, 2012, 4:07 p.m.
Message ID <20121123160717.GB2315@tucnak.redhat.com>
Download mbox | patch
Permalink /patch/201365/
State New
Headers show

Comments

Jakub Jelinek - Nov. 23, 2012, 4:07 p.m.
On Fri, Nov 23, 2012 at 06:47:06PM +0400, Konstantin Serebryany wrote:
> >> > Executing on host: addr2line -f -e
> >> > /usr/local/google/kcc/gcc-build/gcc/testsuite/gcc/memcmp-1.exe
> >> > 0x80488d1 0x8048560   (timeout = 300)
> >> > spawn addr2line -f -e
> >> > /usr/local/google/kcc/gcc-build/gcc/testsuite/gcc/memcmp-1.exe
> >> > 0x80488d1 0x8048560
> >> > BFD: Dwarf Error: found dwarf version '4', this reader only handles
> >> > version 2 and 3 information.
> >
> > Is that split into two lines, or just one line?
> 
> Attached the full log file.

Ah, reproduced with very old addr2line, the problem was that for the first
BFD: line it actually wasn't removing it completely, turned it into an
empty line instead.  Fixed thusly, tested with very old addr2line (which
doesn't handle DWARF 4 at all), old addr2line (which handles it, but doesn't
handle DW_AT_high_pc with const class form) and new addr2line, committed as
obvious.

2012-11-23  Jakub Jelinek  <jakub@redhat.com>

	* lib/asan-dg.exp (asan_symbolize): Remove all "BFD: " prefixed lines
	from the output.



	Jakub
Konstantin Serebryany - Nov. 23, 2012, 4:26 p.m.
On Fri, Nov 23, 2012 at 8:07 PM, Jakub Jelinek <jakub@redhat.com> wrote:
> On Fri, Nov 23, 2012 at 06:47:06PM +0400, Konstantin Serebryany wrote:
>> >> > Executing on host: addr2line -f -e
>> >> > /usr/local/google/kcc/gcc-build/gcc/testsuite/gcc/memcmp-1.exe
>> >> > 0x80488d1 0x8048560   (timeout = 300)
>> >> > spawn addr2line -f -e
>> >> > /usr/local/google/kcc/gcc-build/gcc/testsuite/gcc/memcmp-1.exe
>> >> > 0x80488d1 0x8048560
>> >> > BFD: Dwarf Error: found dwarf version '4', this reader only handles
>> >> > version 2 and 3 information.
>> >
>> > Is that split into two lines, or just one line?
>>
>> Attached the full log file.
>
> Ah, reproduced with very old addr2line, the problem was that for the first
> BFD: line it actually wasn't removing it completely, turned it into an
> empty line instead.  Fixed thusly, tested with very old addr2line (which
> doesn't handle DWARF 4 at all), old addr2line (which handles it, but doesn't
> handle DW_AT_high_pc with const class form) and new addr2line, committed as
> obvious.
Thanks!

--kcc
>
> 2012-11-23  Jakub Jelinek  <jakub@redhat.com>
>
>         * lib/asan-dg.exp (asan_symbolize): Remove all "BFD: " prefixed lines
>         from the output.
>
> --- gcc/testsuite/lib/asan-dg.exp.jj    2012-11-22 11:04:23.000000000 +0100
> +++ gcc/testsuite/lib/asan-dg.exp       2012-11-23 16:52:31.547647181 +0100
> @@ -128,7 +128,8 @@ proc asan_symbolize { output } {
>             set status [remote_exec host "$addr2line_name" $args]
>             if { [lindex $status 0] > 0 } continue
>             regsub -all "\r\n" [lindex $status 1] "\n" addr2line_output
> -           regsub -all "(^|\n|\r)BFD: \[^\n\r\]*" $addr2line_output "" addr2line_output
> +           regsub -all "\[\n\r\]BFD: \[^\n\r\]*" $addr2line_output "" addr2line_output
> +           regsub -all "^BFD: \[^\n\r\]*\[\n\r\]" $addr2line_output "" addr2line_output
>             set addr2line_output [regexp -inline -all -line "^\[^\n\r]*" $addr2line_output]
>             set idx 0
>             foreach val $arr($key) {
>
>
>         Jakub

Patch

--- gcc/testsuite/lib/asan-dg.exp.jj	2012-11-22 11:04:23.000000000 +0100
+++ gcc/testsuite/lib/asan-dg.exp	2012-11-23 16:52:31.547647181 +0100
@@ -128,7 +128,8 @@  proc asan_symbolize { output } {
 	    set status [remote_exec host "$addr2line_name" $args]
 	    if { [lindex $status 0] > 0 } continue
 	    regsub -all "\r\n" [lindex $status 1] "\n" addr2line_output
-	    regsub -all "(^|\n|\r)BFD: \[^\n\r\]*" $addr2line_output "" addr2line_output
+	    regsub -all "\[\n\r\]BFD: \[^\n\r\]*" $addr2line_output "" addr2line_output
+	    regsub -all "^BFD: \[^\n\r\]*\[\n\r\]" $addr2line_output "" addr2line_output
 	    set addr2line_output [regexp -inline -all -line "^\[^\n\r]*" $addr2line_output]
 	    set idx 0
 	    foreach val $arr($key) {