re PR libgcj/13107 (Wrong verification error in gij: recursive subroutine call)
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. From-SVN: r76395
This commit is contained in:
parent
4c442790ef
commit
fe1081b017
@ -1,3 +1,70 @@
|
||||
2004-01-22 Tom Tromey <tromey@redhat.com>
|
||||
|
||||
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.
|
||||
|
||||
2004-01-22 Jeff Sturm <jsturm@one-point.com>
|
||||
|
||||
PR java/13733
|
||||
|
25
libjava/testsuite/libjava.lang/pr13107.java
Normal file
25
libjava/testsuite/libjava.lang/pr13107.java
Normal file
@ -0,0 +1,25 @@
|
||||
class pr13107
|
||||
{
|
||||
public static void main(String[] args)
|
||||
{
|
||||
for (int i = 0; i < 1; i++) {
|
||||
String s = "A";
|
||||
|
||||
if (s == "A")
|
||||
continue;
|
||||
|
||||
try{
|
||||
try{
|
||||
System.out.println(s);
|
||||
}
|
||||
finally{
|
||||
if (s != "A")
|
||||
throw new Error();
|
||||
}
|
||||
}
|
||||
catch(Exception e){
|
||||
s = "B";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
0
libjava/testsuite/libjava.lang/pr13107.out
Normal file
0
libjava/testsuite/libjava.lang/pr13107.out
Normal file
19
libjava/testsuite/libjava.lang/pr13107_2.java
Normal file
19
libjava/testsuite/libjava.lang/pr13107_2.java
Normal file
@ -0,0 +1,19 @@
|
||||
public class pr13107_2
|
||||
{
|
||||
public static int foo (boolean b)
|
||||
{
|
||||
int i;
|
||||
try {
|
||||
if (b) return 1;
|
||||
i= 2;
|
||||
}
|
||||
finally {
|
||||
if (b) i = 3;
|
||||
}
|
||||
return i;
|
||||
}
|
||||
|
||||
public static void main(String[] args)
|
||||
{
|
||||
}
|
||||
}
|
0
libjava/testsuite/libjava.lang/pr13107_2.out
Normal file
0
libjava/testsuite/libjava.lang/pr13107_2.out
Normal file
1
libjava/testsuite/libjava.lang/pr13107_2.xfail
Normal file
1
libjava/testsuite/libjava.lang/pr13107_2.xfail
Normal file
@ -0,0 +1 @@
|
||||
xfail-byte
|
16
libjava/testsuite/libjava.lang/pr13107_3.java
Normal file
16
libjava/testsuite/libjava.lang/pr13107_3.java
Normal file
@ -0,0 +1,16 @@
|
||||
public class pr13107_3
|
||||
{
|
||||
public static void main(String[] args)
|
||||
{
|
||||
for (int i = 0; i < 1; i++)
|
||||
{
|
||||
try {
|
||||
System.out.println(i);
|
||||
}
|
||||
finally {
|
||||
if (i == 3)
|
||||
continue;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
1
libjava/testsuite/libjava.lang/pr13107_3.out
Normal file
1
libjava/testsuite/libjava.lang/pr13107_3.out
Normal file
@ -0,0 +1 @@
|
||||
0
|
1
libjava/testsuite/libjava.lang/pr13107_3.xfail
Normal file
1
libjava/testsuite/libjava.lang/pr13107_3.xfail
Normal file
@ -0,0 +1 @@
|
||||
xfail-byte
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user