public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug java/13107] New: Wrong verification error in gij: recursive subroutine call
@ 2003-11-18 16:14 bonniot at users dot sf dot net
2003-11-18 16:15 ` [Bug java/13107] " bonniot at users dot sf dot net
` (8 more replies)
0 siblings, 9 replies; 10+ messages in thread
From: bonniot at users dot sf dot net @ 2003-11-18 16:14 UTC (permalink / raw)
To: gcc-bugs
The verifier seems to be confused by the two levels of try.
$ javac GIJ.java
$ java GIJ
$ /usr/lib/gcc-snapshot/bin/gij GIJ
Exception in thread "main" java.lang.VerifyError: verification failed at PC 24
in GIJ:main(([Ljava.lang.String;)V): recursive subroutine call
at _Jv_BytecodeVerifier.verify_fail(byte, int)
(/usr/lib/gcc-snapshot/lib/libgcj.so.4.0.0)
at _Jv_BytecodeVerifier.verify_instructions_0()
(/usr/lib/gcc-snapshot/lib/libgcj.so.4.0.0)
at _Jv_VerifyMethod(_Jv_InterpMethod) (/usr/lib/gcc-snapshot/lib/libgcj.so.4.0.0)
at _Jv_PrepareClass(java.lang.Class) (/usr/lib/gcc-snapshot/lib/libgcj.so.4.0.0)
at _Jv_WaitForState(java.lang.Class, int)
(/usr/lib/gcc-snapshot/lib/libgcj.so.4.0.0)
at java.lang.VMClassLoader.linkClass0(java.lang.Class)
(/usr/lib/gcc-snapshot/lib/libgcj.so.4.0.0)
at java.lang.VMClassLoader.resolveClass(java.lang.Class)
(/usr/lib/gcc-snapshot/lib/libgcj.so.4.0.0)
at java.lang.Class.initializeClass() (/usr/lib/gcc-snapshot/lib/libgcj.so.4.0.0)
at java.lang.Class.forName(java.lang.String, boolean, java.lang.ClassLoader)
(/usr/lib/gcc-snapshot/lib/libgcj.so.4.0.0)
at java.lang.Class.forName(java.lang.String)
(/usr/lib/gcc-snapshot/lib/libgcj.so.4.0.0)
at gnu.gcj.runtime.FirstThread.run() (/usr/lib/gcc-snapshot/lib/libgcj.so.4.0.0)
at _Jv_ThreadRun(java.lang.Thread) (/usr/lib/gcc-snapshot/lib/libgcj.so.4.0.0)
at _Jv_RunMain(java.lang.Class, byte const, int, byte const, boolean)
(/usr/lib/gcc-snapshot/lib/libgcj.so.4.0.0)
at __libc_start_main (/lib/libc-2.3.2.so)
$ /usr/lib/gcc-snapshot/bin/gij -version
gij (GNU libgcj) version 3.4 20031116 (experimental)
--
Summary: Wrong verification error in gij: recursive subroutine
call
Product: gcc
Version: 3.4
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: java
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: bonniot at users dot sf dot net
CC: gcc-bugs at gcc dot gnu dot org
GCC host triplet: Linux/i686
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13107
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug java/13107] Wrong verification error in gij: recursive subroutine call
2003-11-18 16:14 [Bug java/13107] New: Wrong verification error in gij: recursive subroutine call bonniot at users dot sf dot net
@ 2003-11-18 16:15 ` bonniot at users dot sf dot net
2003-11-18 16:17 ` bonniot at users dot sf dot net
` (7 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: bonniot at users dot sf dot net @ 2003-11-18 16:15 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From bonniot at users dot sf dot net 2003-11-18 16:15 -------
Created an attachment (id=5161)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=5161&action=view)
Source testcase
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13107
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug java/13107] Wrong verification error in gij: recursive subroutine call
2003-11-18 16:14 [Bug java/13107] New: Wrong verification error in gij: recursive subroutine call bonniot at users dot sf dot net
2003-11-18 16:15 ` [Bug java/13107] " bonniot at users dot sf dot net
@ 2003-11-18 16:17 ` bonniot at users dot sf dot net
2003-11-18 19:08 ` tromey at gcc dot gnu dot org
` (6 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: bonniot at users dot sf dot net @ 2003-11-18 16:17 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From bonniot at users dot sf dot net 2003-11-18 16:17 -------
Created an attachment (id=5162)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=5162&action=view)
Compiled version
Compiled with JDK 1.4.1
Compiling the same source with jikes also lead to a verification error in gij,
at a different PC (still a jsr).
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13107
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug java/13107] Wrong verification error in gij: recursive subroutine call
2003-11-18 16:14 [Bug java/13107] New: Wrong verification error in gij: recursive subroutine call bonniot at users dot sf dot net
2003-11-18 16:15 ` [Bug java/13107] " bonniot at users dot sf dot net
2003-11-18 16:17 ` bonniot at users dot sf dot net
@ 2003-11-18 19:08 ` tromey at gcc dot gnu dot org
2003-11-18 21:12 ` tromey at gcc dot gnu dot org
` (5 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: tromey at gcc dot gnu dot org @ 2003-11-18 19:08 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From tromey at gcc dot gnu dot org 2003-11-18 19:08 -------
Definitely a verifier bug.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever Confirmed| |1
Last reconfirmed|0000-00-00 00:00:00 |2003-11-18 19:08:29
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13107
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug java/13107] Wrong verification error in gij: recursive subroutine call
2003-11-18 16:14 [Bug java/13107] New: Wrong verification error in gij: recursive subroutine call bonniot at users dot sf dot net
` (2 preceding siblings ...)
2003-11-18 19:08 ` tromey at gcc dot gnu dot org
@ 2003-11-18 21:12 ` tromey at gcc dot gnu dot org
2003-11-19 1:07 ` tromey at gcc dot gnu dot org
` (4 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: tromey at gcc dot gnu dot org @ 2003-11-18 21:12 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From tromey at gcc dot gnu dot org 2003-11-18 21:12 -------
The bug here is that we propagate subroutine information into
an exception handler. However, clearing subroutine state in
state::set_exception results in verifier regressions elsewhere
(see the mauve verifier tests).
The underlying problem seems to be that our representation of
subroutines is incorrect. Perhaps we need to not keep track of
the "current subroutine" but instead just keep the PC info in
the return_address_type and look at that.
More investigation is required, alas.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13107
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug java/13107] Wrong verification error in gij: recursive subroutine call
2003-11-18 16:14 [Bug java/13107] New: Wrong verification error in gij: recursive subroutine call bonniot at users dot sf dot net
` (3 preceding siblings ...)
2003-11-18 21:12 ` tromey at gcc dot gnu dot org
@ 2003-11-19 1:07 ` tromey at gcc dot gnu dot org
2004-01-01 5:28 ` [Bug libgcj/13107] " pinskia at gcc dot gnu dot org
` (3 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: tromey at gcc dot gnu dot org @ 2003-11-19 1:07 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From tromey at gcc dot gnu dot org 2003-11-19 01:07 -------
Verifier bugs are should-fix for 3.4.
--
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|--- |3.4
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13107
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug libgcj/13107] Wrong verification error in gij: recursive subroutine call
2003-11-18 16:14 [Bug java/13107] New: Wrong verification error in gij: recursive subroutine call bonniot at users dot sf dot net
` (4 preceding siblings ...)
2003-11-19 1:07 ` tromey at gcc dot gnu dot org
@ 2004-01-01 5:28 ` pinskia at gcc dot gnu dot org
2004-01-23 2:50 ` cvs-commit at gcc dot gnu dot org
` (2 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-01-01 5:28 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-01-01 05:28 -------
gij is part of libgcj.
--
What |Removed |Added
----------------------------------------------------------------------------
Component|java |libgcj
Last reconfirmed|2003-11-18 19:08:29 |2004-01-01 05:28:46
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13107
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug libgcj/13107] Wrong verification error in gij: recursive subroutine call
2003-11-18 16:14 [Bug java/13107] New: Wrong verification error in gij: recursive subroutine call bonniot at users dot sf dot net
` (5 preceding siblings ...)
2004-01-01 5:28 ` [Bug libgcj/13107] " pinskia at gcc dot gnu dot org
@ 2004-01-23 2:50 ` cvs-commit at gcc dot gnu dot org
2004-02-10 1:55 ` pinskia at gcc dot gnu dot org
2004-04-13 21:36 ` tromey at gcc dot gnu dot org
8 siblings, 0 replies; 10+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2004-01-23 2:50 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From cvs-commit at gcc dot gnu dot org 2004-01-23 02:50 -------
Subject: Bug 13107
CVSROOT: /cvs/gcc
Module name: gcc
Changes by: tromey@gcc.gnu.org 2004-01-23 02:49:57
Modified files:
libjava : ChangeLog verify.cc
Added files:
libjava/testsuite/libjava.lang: pr13107.java pr13107.out
pr13107_2.java pr13107_2.out
pr13107_2.xfail pr13107_3.java
pr13107_3.out pr13107_3.xfail
Log message:
PR libgcj/13107:
* testsuite/libjava.lang/pr13107_2.xfail: New file.
* testsuite/libjava.lang/pr13107_3.xfail: New file.
* testsuite/libjava.lang/pr13107_3.java: New file.
* testsuite/libjava.lang/pr13107_3.out: New file.
* testsuite/libjava.lang/pr13107_2.java: New file.
* testsuite/libjava.lang/pr13107_2.out: New file.
* testsuite/libjava.lang/pr13107.java: New file.
* testsuite/libjava.lang/pr13107.out: New file.
* verify.cc (jsr_ptrs): Removed.
(entry_points): Likewise.
(struct subr_info): Likewise.
(struct subr_entry_info): Likewise.
(type_val::unused_by_subroutine_type): Likewise.
(type::merge): Don't handle unused_by_subroutine_type.
(type::print): Likewise.
(state::flags): Removed.
(state::subroutine): Likewise.
(state::seen_subrs): Likewise.
(state::NO_STACK): Likewise.
(state::FLAG_CHANGED, state::FLAG_UNUSED): Likewise.
(state): Updated all methods.
(state::clean_subrs): Removed.
(state::state): Removed `ret_semantics' flag.
(state::copy): Likewise.
(state::add_subr): Removed.
(state::enter_subroutine): Likewise.
(type::set_return_address): New method.
(handle_jsr_insn): Set return address on the type. Always
invalidate PC after call.
(check_nonrecursive_call): Removed.
(~_Jv_BytecodeVerifier): Updated.
(branch_prepass): Removed special handling of jsr.
(note_branch_target): Likewise.
(get_subroutine): Removed.
(state::merge): Don't merge subroutines and don't handle
NO_STACK. Removed ret_semantics and jsr_semantics arguments.
(state::note_variable): Removed.
(state::is_unmerged_ret_state): Likewise.
(state::print): Updated.
(set_variable): Likewise.
(merge_into): Renamed from push_jump_merge. Removed ret_semantics
and jsr_semantics arguments. Updated for new reverification
list.
(pop_jump): Rewrote.
(construct_primitive_array_type): Updated.
(state::next): Removed.
(INVALID_STATE): New define.
(state::INVALID): Removed.
(state::NO_NEXT): New value.
(state::pc, state::next): New fields.
(state::get_pc): New method.
(next_verify_pc): Removed.
(next_verify_state): New field.
(verify_instructions_0): Always check for falling off end.
(linked): New type.
(linked_utf8): Removed.
(states): Changed type.
(type::state_mergeable_p): New method.
(state::state_mergeable_p): Likewise.
(handle_ret_insn): Removed most code.
(state::reverify): New method.
(add_new_state): Likewise.
(state::set_pc): Likewise.
Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libjava/ChangeLog.diff?cvsroot=gcc&r1=1.2588&r2=1.2589
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libjava/verify.cc.diff?cvsroot=gcc&r1=1.59&r2=1.60
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libjava/testsuite/libjava.lang/pr13107.java.diff?cvsroot=gcc&r1=NONE&r2=1.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libjava/testsuite/libjava.lang/pr13107.out.diff?cvsroot=gcc&r1=NONE&r2=1.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libjava/testsuite/libjava.lang/pr13107_2.java.diff?cvsroot=gcc&r1=NONE&r2=1.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libjava/testsuite/libjava.lang/pr13107_2.out.diff?cvsroot=gcc&r1=NONE&r2=1.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libjava/testsuite/libjava.lang/pr13107_2.xfail.diff?cvsroot=gcc&r1=NONE&r2=1.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libjava/testsuite/libjava.lang/pr13107_3.java.diff?cvsroot=gcc&r1=NONE&r2=1.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libjava/testsuite/libjava.lang/pr13107_3.out.diff?cvsroot=gcc&r1=NONE&r2=1.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libjava/testsuite/libjava.lang/pr13107_3.xfail.diff?cvsroot=gcc&r1=NONE&r2=1.1
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13107
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug libgcj/13107] Wrong verification error in gij: recursive subroutine call
2003-11-18 16:14 [Bug java/13107] New: Wrong verification error in gij: recursive subroutine call bonniot at users dot sf dot net
` (6 preceding siblings ...)
2004-01-23 2:50 ` cvs-commit at gcc dot gnu dot org
@ 2004-02-10 1:55 ` pinskia at gcc dot gnu dot org
2004-04-13 21:36 ` tromey at gcc dot gnu dot org
8 siblings, 0 replies; 10+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-02-10 1:55 UTC (permalink / raw)
To: gcc-bugs
--
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|3.4.0 |3.5.0
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13107
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug libgcj/13107] Wrong verification error in gij: recursive subroutine call
2003-11-18 16:14 [Bug java/13107] New: Wrong verification error in gij: recursive subroutine call bonniot at users dot sf dot net
` (7 preceding siblings ...)
2004-02-10 1:55 ` pinskia at gcc dot gnu dot org
@ 2004-04-13 21:36 ` tromey at gcc dot gnu dot org
8 siblings, 0 replies; 10+ messages in thread
From: tromey at gcc dot gnu dot org @ 2004-04-13 21:36 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From tromey at gcc dot gnu dot org 2004-04-13 21:03 -------
This is fixed in the cvs libgcj.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |FIXED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13107
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2004-04-13 21:04 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-11-18 16:14 [Bug java/13107] New: Wrong verification error in gij: recursive subroutine call bonniot at users dot sf dot net
2003-11-18 16:15 ` [Bug java/13107] " bonniot at users dot sf dot net
2003-11-18 16:17 ` bonniot at users dot sf dot net
2003-11-18 19:08 ` tromey at gcc dot gnu dot org
2003-11-18 21:12 ` tromey at gcc dot gnu dot org
2003-11-19 1:07 ` tromey at gcc dot gnu dot org
2004-01-01 5:28 ` [Bug libgcj/13107] " pinskia at gcc dot gnu dot org
2004-01-23 2:50 ` cvs-commit at gcc dot gnu dot org
2004-02-10 1:55 ` pinskia at gcc dot gnu dot org
2004-04-13 21:36 ` tromey at gcc dot gnu dot org
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).