This is the mail archive of the gcc-bugs@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]

3.0 alpha-unknown-freebsd4.2: EH (Further) Broken Recently (was: Re: 3.0 mips-sgi-irix6.5: Exception Handling Broken Recently)


In article <20010521192142.A9360@redhat.com> you write:

>> Some time between 18May and 21May, many C++ test executions failed for
>> code produced by gcc 3.0 mips-sgi-irix6.5.  For example, running this
>> simple program:
[...]
>> causes a segmentation violation:
[...]
> I find it astonishing that the irix assembler does not 
> propagate the alignment implied by a ".align" directive to
> the section header.

With the simple EH example Jeffrey posted, I see the same symptom on
alpha-unknown-freebsd4.2 (gcc 3.0 built on May 18).  However, for the
record, more complex EH tests were already failing on this platform
before the EH upgrade (gcc 3.0 built on May 10 had these g++ testsuite
failures) (and, yes, I suspect that it was because we have a
misconfiguration on alpha-*-freebsd* somewhere):

FAIL: g++.abi/cxa_vec.C (test for excess errors)
FAIL: g++.abi/cxa_vec.C  Execution test
FAIL: g++.eh/badalloc1.C  Execution test
FAIL: g++.eh/cleanup2.C  Execution test
FAIL: g++.eh/spec1.C  Execution test
FAIL: g++.eh/spec2.C  Execution test
FAIL: g++.eh/spec3.C  Execution test
FAIL: g++.eh/tmpl1.C  Execution test
FAIL: g++.law/profile1.C  Execution test
FAIL: g++.mike/dyncast1.C  Execution test
FAIL: g++.mike/dyncast2.C  Execution test
FAIL: g++.mike/eh33.C  Execution test
FAIL: g++.mike/eh50.C  Execution test
FAIL: g++.mike/eh51.C  Execution test
FAIL: g++.other/call1.C  Execution test

On May 15, there were 81 C++ failures seen.  On May 18, there were 105
C++ failures seen.  A quick scan reveals the new failures were all
EH-related.  This tracked a rapid increase in EH failures for
alpha-*-linux* over the same time period.

In case this is something rather obvious to the EH-maintainers, here
is the alpha asm output from that example:

; /usr/local/beta-gcc/bin/g++ -static eh.C
; ./a.out
pid 18220 (a.out): unaligned access: va=0x12001c56a pc=0x1200005a0 ra=0x1200008a4 op=ldq
segmentation violation--core dumped
; /usr/local/beta-gcc/bin/g++ -S eh.C
; cat eh.s
	.set noat
	.set noreorder
	.globl _Unwind_Resume
	.text
	.align 4
	.globl main
	.ent main
main:
	.frame $15,32,$26,0
	.mask 0x4008000,-32
$LFB1:
	ldgp $29,0($27)
$main..ng:
	lda $30,-32($30)
$LCFI0:
	stq $26,0($30)
$LCFI1:
	stq $15,8($30)
$LCFI2:
	mov $30,$15
$LCFI3:
	.prologue 1
	lda $16,4
	jsr $26,__cxa_allocate_exception
	ldgp $29,0($26)
	mov $0,$2
	lda $1,1
	stl $1,0($2)
	mov $2,$16
	lda $17,_ZTIi
	mov $31,$18
$LEHB0:
	jsr $26,__cxa_throw
$LEHE0:
$L12:
	ldgp $29,0($26)
	mov $16,$1
	jsr $26,__cxa_begin_catch
	ldgp $29,0($26)
$LEHB1:
	jsr $26,__cxa_end_catch
	ldgp $29,0($26)
$LEHE1:
	mov $31,$0
	mov $15,$30
	ldq $26,0($30)
	ldq $15,8($30)
	lda $30,32($30)
	ret $31,($26),1
$LFE1:
	.end main
	.section	.gcc_except_table,"aw",@progbits
	.align 2
$LLSDA1:
	.byte	0xff
	.byte	0x9b
	.uleb128 $LLSDATT1-$LLSDATTD1
$LLSDATTD1:
	.byte	0x1
	.uleb128 $LLSDACSE1-$LLSDACSB1
$LLSDACSB1:
	.uleb128 $LEHB0-$LFB1
	.uleb128 $LEHE0-$LEHB0
	.uleb128 $L12-$LFB1
	.uleb128 0x1
	.uleb128 $LEHB1-$LFB1
	.uleb128 $LEHE1-$LEHB1
	.uleb128 0x0
	.uleb128 0x0
$LLSDACSE1:
	.byte	0x1
	.byte	0x0
	.align 2
	.long 0

$LLSDATT1:
	.text
	.section	.eh_frame,"aw",@progbits
__FRAME_BEGIN__:
	.4byte	$LECIE1-$LSCIE1
$LSCIE1:
	.4byte	0x0
	.byte	0x1
	.ascii "zPLR\0"
	.uleb128 0x1
	.sleb128 -8
	.byte	0x1a
	.uleb128 0x7
	.byte	0x9b
	.4byte	$LC0-.
	.byte	0x1b
	.byte	0x1b
	.byte	0xc
	.uleb128 0x1e
	.uleb128 0x0
	.align 3
$LECIE1:
$LSFDE1:
	.4byte	$LEFDE1-$LASFDE1
$LASFDE1:
	.4byte	$LASFDE1-__FRAME_BEGIN__
	.4byte	$LFB1-.
	.4byte	$LFE1-$LFB1
	.uleb128 0x4
	.4byte	$LLSDA1-.
	.byte	0x4
	.4byte	$LCFI0-$LFB1
	.byte	0xe
	.uleb128 0x20
	.byte	0x4
	.4byte	$LCFI2-$LCFI0
	.byte	0x8f
	.uleb128 0x3
	.byte	0x9a
	.uleb128 0x4
	.byte	0x4
	.4byte	$LCFI3-$LCFI2
	.byte	0xc
	.uleb128 0xf
	.uleb128 0x20
	.align 3
$LEFDE1:
	.data
	.align 3
$LC0:
	.quad __gxx_personality_v0
	.ident	"GCC: (GNU) 3.0 20010518 (prerelease)"


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