This is the mail archive of the java-patches@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[gcjx] Patch: FYI: fix crash in bytecode generator


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)


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