public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/25176] New: FAIL: Array_3 -O3 execution - bytecode->native test
@ 2005-11-30 2:17 amodra at bigpond dot net dot au
2005-11-30 2:26 ` [Bug target/25176] " pinskia at gcc dot gnu dot org
` (9 more replies)
0 siblings, 10 replies; 11+ messages in thread
From: amodra at bigpond dot net dot au @ 2005-11-30 2:17 UTC (permalink / raw)
To: gcc-bugs
libjava/testsuite/libjava.lang/Array_3.java has failed on powerpc64-linux for
quite a while. See
http://gcc.gnu.org/ml/gcc-testresults/2005-03/msg01215.html. The problem is
that in
static int baz ()
{
int[] x = (int[])null;
int nn = x.length;
return 5;
}
...
try
{
nn = baz ();
}
catch (NullPointerException _)
...
we have
00000000100010b0 <._ZN7Array_33bazEv>:
100010b0: 7c 08 02 a6 mflr r0
100010b4: e8 62 80 50 ld r3,-32688(r2)
100010b8: f8 01 00 10 std r0,16(r1)
100010bc: f8 21 ff 91 stdu r1,-112(r1) <-- new stack frame
100010c0: 4b ff fc b9 bl 10000d78 <._init+0x68>
100010c4: e8 41 00 28 ld r2,40(r1)
100010c8: 39 20 00 00 li r9,0
100010cc: 38 21 00 70 addi r1,r1,112 <- restore old frame
100010d0: 38 60 00 05 li r3,5
100010d4: 80 09 00 08 lwz r0,8(r9) <-- segv here
100010d8: e8 01 00 10 ld r0,16(r1)
100010dc: 7c 08 03 a6 mtlr r0
100010e0: 4e 80 00 20 blr
Note that the faulting instruction has moved past the stack frame restore.
This confuses the dwarf2 unwinder, because no dwarf2 description is emitted for
the function epilogue. We either need a dwarf2 epilogue description or must
prevent any instruction that might cause an exception from being scheduled
after the stack frame restore.
--
Summary: FAIL: Array_3 -O3 execution - bytecode->native test
Product: gcc
Version: 4.2.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: target
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: amodra at bigpond dot net dot au
GCC target triplet: powerpc64-linux
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25176
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug target/25176] FAIL: Array_3 -O3 execution - bytecode->native test
2005-11-30 2:17 [Bug target/25176] New: FAIL: Array_3 -O3 execution - bytecode->native test amodra at bigpond dot net dot au
@ 2005-11-30 2:26 ` pinskia at gcc dot gnu dot org
2005-11-30 13:07 ` amodra at bigpond dot net dot au
` (8 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-11-30 2:26 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from pinskia at gcc dot gnu dot org 2005-11-30 02:26 -------
Confirmed, also happens on ppc-darwin. (Note this is most likely on other
targets too, there is a bug about x86_64 and this IIRC to get libuwind to pass
its tests).
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever Confirmed|0 |1
GCC target triplet|powerpc64-linux |powerpc64-linux, powerpc-
| |darwin
Keywords| |EH, wrong-code
Last reconfirmed|0000-00-00 00:00:00 |2005-11-30 02:26:24
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25176
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug target/25176] FAIL: Array_3 -O3 execution - bytecode->native test
2005-11-30 2:17 [Bug target/25176] New: FAIL: Array_3 -O3 execution - bytecode->native test amodra at bigpond dot net dot au
2005-11-30 2:26 ` [Bug target/25176] " pinskia at gcc dot gnu dot org
@ 2005-11-30 13:07 ` amodra at bigpond dot net dot au
2005-11-30 23:07 ` rth at gcc dot gnu dot org
` (7 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: amodra at bigpond dot net dot au @ 2005-11-30 13:07 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from amodra at bigpond dot net dot au 2005-11-30 13:07 -------
I had a little play at implementing unwinder info for the epilogue. It's easy
to arrange for a "DW_CFA_def_cfa_offset: 0" to be emitted on the stack restore.
However, often the function exit isn't emitted last. Many functions have
blocks of code emitted to higher addresses past the exit. So you need to emit
further dwarf2 info specifying the stack offset in these blocks.
It probably wouldn't be hard to teach dwarf2out how to handle this, by tracking
NOTE_INSN_EPILOGUE_BEG and any following NOTE_INSN_BASIC_BLOCK, but I'm
wondering whether it is worth the increase in .eh_frame size..
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25176
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug target/25176] FAIL: Array_3 -O3 execution - bytecode->native test
2005-11-30 2:17 [Bug target/25176] New: FAIL: Array_3 -O3 execution - bytecode->native test amodra at bigpond dot net dot au
2005-11-30 2:26 ` [Bug target/25176] " pinskia at gcc dot gnu dot org
2005-11-30 13:07 ` amodra at bigpond dot net dot au
@ 2005-11-30 23:07 ` rth at gcc dot gnu dot org
2005-12-01 10:06 ` christian dot joensson at gmail dot com
` (6 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: rth at gcc dot gnu dot org @ 2005-11-30 23:07 UTC (permalink / raw)
To: gcc-bugs
------- Comment #3 from rth at gcc dot gnu dot org 2005-11-30 23:07 -------
Fixing the unwinder to handle epilogues is harder than you think, I think.
My guess is that it'll require completely rewriting the unwind generator.
It'll need to be CFG aware, which means it'll have to happen while the CFG
is still available and do some sort of notes to remember it. Or perhaps
preserve the CFG until the end of compilation. Which would require some
handling for the reorg pass -- perhaps simply regenerating the CFG.
Not that I want to discourage anyone from tackling this, but the only short
term fix is some sort of barrier to prevent scheduling the epilogue past
any potentially trapping insns.
--
rth at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |rth at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25176
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug target/25176] FAIL: Array_3 -O3 execution - bytecode->native test
2005-11-30 2:17 [Bug target/25176] New: FAIL: Array_3 -O3 execution - bytecode->native test amodra at bigpond dot net dot au
` (2 preceding siblings ...)
2005-11-30 23:07 ` rth at gcc dot gnu dot org
@ 2005-12-01 10:06 ` christian dot joensson at gmail dot com
2005-12-02 0:29 ` [Bug middle-end/25176] " amodra at bigpond dot net dot au
` (5 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: christian dot joensson at gmail dot com @ 2005-12-01 10:06 UTC (permalink / raw)
To: gcc-bugs
------- Comment #4 from christian dot joensson at gmail dot com 2005-12-01 10:06 -------
Not 100% sure, but I do believe this has happend on sparc/sparc64 linux for a
quite some time...
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25176
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug middle-end/25176] FAIL: Array_3 -O3 execution - bytecode->native test
2005-11-30 2:17 [Bug target/25176] New: FAIL: Array_3 -O3 execution - bytecode->native test amodra at bigpond dot net dot au
` (3 preceding siblings ...)
2005-12-01 10:06 ` christian dot joensson at gmail dot com
@ 2005-12-02 0:29 ` amodra at bigpond dot net dot au
2005-12-02 6:16 ` amodra at gcc dot gnu dot org
` (4 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: amodra at bigpond dot net dot au @ 2005-12-02 0:29 UTC (permalink / raw)
To: gcc-bugs
--
amodra at bigpond dot net dot au changed:
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|unassigned at gcc dot gnu |amodra at bigpond dot net
|dot org |dot au
URL| |http://gcc.gnu.org/ml/gcc-
| |patches/2005-
| |12/msg00094.html
Status|NEW |ASSIGNED
Component|target |middle-end
Last reconfirmed|2005-11-30 02:26:24 |2005-12-02 00:29:16
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25176
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug middle-end/25176] FAIL: Array_3 -O3 execution - bytecode->native test
2005-11-30 2:17 [Bug target/25176] New: FAIL: Array_3 -O3 execution - bytecode->native test amodra at bigpond dot net dot au
` (5 preceding siblings ...)
2005-12-02 6:16 ` amodra at gcc dot gnu dot org
@ 2005-12-02 6:16 ` amodra at gcc dot gnu dot org
2005-12-02 6:24 ` [Bug middle-end/25176] [4.0 only] " amodra at bigpond dot net dot au
` (2 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: amodra at gcc dot gnu dot org @ 2005-12-02 6:16 UTC (permalink / raw)
To: gcc-bugs
------- Comment #5 from amodra at gcc dot gnu dot org 2005-12-02 06:15 -------
Subject: Bug 25176
Author: amodra
Date: Fri Dec 2 06:15:54 2005
New Revision: 107871
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=107871
Log:
PR middle-end/25176
* function.c (expand_function_end): Emit blockage for unwinder
after return label.
Modified:
trunk/gcc/ChangeLog
trunk/gcc/function.c
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25176
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug middle-end/25176] FAIL: Array_3 -O3 execution - bytecode->native test
2005-11-30 2:17 [Bug target/25176] New: FAIL: Array_3 -O3 execution - bytecode->native test amodra at bigpond dot net dot au
` (4 preceding siblings ...)
2005-12-02 0:29 ` [Bug middle-end/25176] " amodra at bigpond dot net dot au
@ 2005-12-02 6:16 ` amodra at gcc dot gnu dot org
2005-12-02 6:16 ` amodra at gcc dot gnu dot org
` (3 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: amodra at gcc dot gnu dot org @ 2005-12-02 6:16 UTC (permalink / raw)
To: gcc-bugs
------- Comment #6 from amodra at gcc dot gnu dot org 2005-12-02 06:16 -------
Subject: Bug 25176
Author: amodra
Date: Fri Dec 2 06:16:21 2005
New Revision: 107872
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=107872
Log:
PR middle-end/25176
* function.c (expand_function_end): Emit blockage for unwinder
after return label.
Modified:
branches/gcc-4_1-branch/gcc/ChangeLog
branches/gcc-4_1-branch/gcc/function.c
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25176
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug middle-end/25176] [4.0 only] FAIL: Array_3 -O3 execution - bytecode->native test
2005-11-30 2:17 [Bug target/25176] New: FAIL: Array_3 -O3 execution - bytecode->native test amodra at bigpond dot net dot au
` (6 preceding siblings ...)
2005-12-02 6:16 ` amodra at gcc dot gnu dot org
@ 2005-12-02 6:24 ` amodra at bigpond dot net dot au
2006-01-26 11:18 ` amodra at gcc dot gnu dot org
2006-01-26 11:19 ` amodra at bigpond dot net dot au
9 siblings, 0 replies; 11+ messages in thread
From: amodra at bigpond dot net dot au @ 2005-12-02 6:24 UTC (permalink / raw)
To: gcc-bugs
--
amodra at bigpond dot net dot au changed:
What |Removed |Added
----------------------------------------------------------------------------
Summary|FAIL: Array_3 -O3 execution |[4.0 only] FAIL: Array_3 -O3
|- bytecode->native test |execution - bytecode->native
| |test
Target Milestone|--- |4.1.0
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25176
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug middle-end/25176] [4.0 only] FAIL: Array_3 -O3 execution - bytecode->native test
2005-11-30 2:17 [Bug target/25176] New: FAIL: Array_3 -O3 execution - bytecode->native test amodra at bigpond dot net dot au
` (7 preceding siblings ...)
2005-12-02 6:24 ` [Bug middle-end/25176] [4.0 only] " amodra at bigpond dot net dot au
@ 2006-01-26 11:18 ` amodra at gcc dot gnu dot org
2006-01-26 11:19 ` amodra at bigpond dot net dot au
9 siblings, 0 replies; 11+ messages in thread
From: amodra at gcc dot gnu dot org @ 2006-01-26 11:18 UTC (permalink / raw)
To: gcc-bugs
------- Comment #7 from amodra at gcc dot gnu dot org 2006-01-26 11:18 -------
Subject: Bug 25176
Author: amodra
Date: Thu Jan 26 11:18:39 2006
New Revision: 110251
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=110251
Log:
PR middle-end/25176
* function.c (expand_function_end): Emit blockage for unwinder
after return label.
Modified:
branches/gcc-4_0-branch/gcc/ChangeLog
branches/gcc-4_0-branch/gcc/function.c
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25176
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug middle-end/25176] [4.0 only] FAIL: Array_3 -O3 execution - bytecode->native test
2005-11-30 2:17 [Bug target/25176] New: FAIL: Array_3 -O3 execution - bytecode->native test amodra at bigpond dot net dot au
` (8 preceding siblings ...)
2006-01-26 11:18 ` amodra at gcc dot gnu dot org
@ 2006-01-26 11:19 ` amodra at bigpond dot net dot au
9 siblings, 0 replies; 11+ messages in thread
From: amodra at bigpond dot net dot au @ 2006-01-26 11:19 UTC (permalink / raw)
To: gcc-bugs
------- Comment #8 from amodra at bigpond dot net dot au 2006-01-26 11:19 -------
Fixed
--
amodra at bigpond dot net dot au changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25176
^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2006-01-26 11:19 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-11-30 2:17 [Bug target/25176] New: FAIL: Array_3 -O3 execution - bytecode->native test amodra at bigpond dot net dot au
2005-11-30 2:26 ` [Bug target/25176] " pinskia at gcc dot gnu dot org
2005-11-30 13:07 ` amodra at bigpond dot net dot au
2005-11-30 23:07 ` rth at gcc dot gnu dot org
2005-12-01 10:06 ` christian dot joensson at gmail dot com
2005-12-02 0:29 ` [Bug middle-end/25176] " amodra at bigpond dot net dot au
2005-12-02 6:16 ` amodra at gcc dot gnu dot org
2005-12-02 6:16 ` amodra at gcc dot gnu dot org
2005-12-02 6:24 ` [Bug middle-end/25176] [4.0 only] " amodra at bigpond dot net dot au
2006-01-26 11:18 ` amodra at gcc dot gnu dot org
2006-01-26 11:19 ` amodra at bigpond dot net dot au
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).