This is the mail archive of the
java-patches@sources.redhat.com
mailing list for the Java project.
PATCH: Fix gij stack traces
- To: java-patches at sourceware dot cygnus dot com
- Subject: PATCH: Fix gij stack traces
- From: Bryce McKinlay <bryce at albatross dot co dot nz>
- Date: Thu, 23 Nov 2000 18:48:08 +1300
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;
}
}