This is the mail archive of the
java-patches@gcc.gnu.org
mailing list for the Java project.
[gcjx] Patch: FYI: fix crash in bytecode generator
- From: Tom Tromey <tromey at redhat dot com>
- To: Java Patch List <java-patches at gcc dot gnu dot org>
- Date: 11 Jul 2005 10:48:11 -0600
- Subject: [gcjx] Patch: FYI: fix crash in bytecode generator
- Reply-to: tromey at redhat dot com
I'm checking this in on the gcjx branch.
The bytecode generator could crash when printing an error message if
it failed to find a no-argument method it was looking for.
Tom
Index: ChangeLog
from Tom Tromey <tromey@redhat.com>
* bytecode/generate.cc (find_method): Don't crash if argtype is
NULL and method is not found.
Index: bytecode/generate.cc
===================================================================
RCS file: /cvs/gcc/gcc/gcjx/bytecode/Attic/generate.cc,v
retrieving revision 1.1.2.15
diff -u -r1.1.2.15 generate.cc
--- bytecode/generate.cc 11 Jul 2005 16:44:08 -0000 1.1.2.15
+++ bytecode/generate.cc 11 Jul 2005 16:50:22 -0000
@@ -2143,7 +2143,7 @@
throw request->error ("couldn't find method %1 with argument of type "
"%2 in class %3 -- perhaps you have the wrong "
"class library?")
- % mname % argtype % klass;
+ % mname % (argtype ? argtype : primitive_void_type) % klass;
}
if (result->get_return_type () != result_type)