Commit 963ebe78 by Andrew Haley Committed by Andrew Haley

re PR libgcj/18036 (Bad interaction between interpreter and Class.forName())

2004-10-18  Andrew Haley  <aph@redhat.com>

        PR java/18036:
        * gnu/gcj/runtime/natStackTrace.cc (fillInStackTrace): Reorganize
        and correct logic used to find interpreter.

From-SVN: r89221
parent e5871096
2004-10-18 Andrew Haley <aph@redhat.com>
PR java/18036:
* gnu/gcj/runtime/natStackTrace.cc (fillInStackTrace): Reorganize
and correct logic used to find interpreter.
2004-10-18 Jeroen Frijters <jeroen@frijters.net> 2004-10-18 Jeroen Frijters <jeroen@frijters.net>
* java/util/logging/LogManager.java * java/util/logging/LogManager.java
......
...@@ -92,9 +92,12 @@ gnu::gcj::runtime::StackTrace::fillInStackTrace (jint maxlen, jint offset) ...@@ -92,9 +92,12 @@ gnu::gcj::runtime::StackTrace::fillInStackTrace (jint maxlen, jint offset)
// less than _Jv_EndOfInterpreter it might be in the // less than _Jv_EndOfInterpreter it might be in the
// interpreter: we call _Unwind_FindEnclosingFunction to // interpreter: we call _Unwind_FindEnclosingFunction to
// find out. // find out.
if ((_Jv_EndOfInterpreter == NULL || pc < _Jv_EndOfInterpreter) if (pc >= _Jv_StartOfInterpreter
&& (_Unwind_FindEnclosingFunction (pc) && (pc < _Jv_EndOfInterpreter
== _Jv_StartOfInterpreter)) || _Jv_EndOfInterpreter == NULL))
{
if (_Unwind_FindEnclosingFunction (pc)
== _Jv_StartOfInterpreter)
{ {
frame[n].interp = (void *) interp_frame->self; frame[n].interp = (void *) interp_frame->self;
interp_frame = interp_frame->next; interp_frame = interp_frame->next;
...@@ -104,10 +107,10 @@ gnu::gcj::runtime::StackTrace::fillInStackTrace (jint maxlen, jint offset) ...@@ -104,10 +107,10 @@ gnu::gcj::runtime::StackTrace::fillInStackTrace (jint maxlen, jint offset)
// We've found an address that we know is not within // We've found an address that we know is not within
// the interpreter. We use that to refine our upper // the interpreter. We use that to refine our upper
// bound on where the interpreter ends. // bound on where the interpreter ends.
if (_Jv_EndOfInterpreter == NULL || pc < _Jv_EndOfInterpreter)
_Jv_EndOfInterpreter = pc; _Jv_EndOfInterpreter = pc;
} }
} }
}
#endif // INTERPRETER #endif // INTERPRETER
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment