This is the mail archive of the java-patches@sources.redhat.com 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]

PATCH: Fix gij stack traces


I'm checking in this patch from Mark for PR 370. A bit of extra checking
doesn't hurt and it fixes the immediate problem.

Eventually we want to have a common entry point into libgcj that is used
by gij, jv-genmain, and both JNI and CNI invocation (as opposed to the
current situation where we have separate entry points with separate
argument processing, etc).  Its may be important to always have an argv
set (even if we have to fake it) because we want to pass it down to
other libraries (ie gtk).

regards

  [ bryce ]

2000-11-23  Mark Wielaard  <mark@klomp.org>

	* name-finder.cc (lookup): Check for a NULL _Jv_argv before attempting
	lookup.

Index: name-finder.cc
===================================================================
RCS file: /cvs/java/libgcj/libjava/name-finder.cc,v
retrieving revision 1.5
diff -u -r1.5 name-finder.cc
--- name-finder.cc	2000/10/09 01:54:50	1.5
+++ name-finder.cc	2000/11/23 05:34:34
@@ -149,7 +149,7 @@
 	strncpy (method_name, dl_info.dli_sname, sizeof method_name);
        
        /* Don't trust dladdr() if the address is from the main program. */
-       if (strcmp (file_name, _Jv_argv[0]) != 0)
+       if (_Jv_argv == NULL || strcmp (file_name, _Jv_argv[0]) != 0)
          return true;
       }
   }

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