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]

PR java/18036: Bad interaction between interpreter and Class.forName()


Was a logic thinko.  Duh.

Andrew.


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.
	
Index: gnu/gcj/runtime/natStackTrace.cc
===================================================================
RCS file: /cvs/gcc/gcc/libjava/gnu/gcj/runtime/natStackTrace.cc,v
retrieving revision 1.7
diff -p -2 -c -w -r1.7 natStackTrace.cc
*** gnu/gcj/runtime/natStackTrace.cc    14 Oct 2004 15:20:51 -0000      1.7
--- gnu/gcj/runtime/natStackTrace.cc    18 Oct 2004 13:23:51 -0000
*************** gnu::gcj::runtime::StackTrace::fillInSta
*** 93,99 ****
              // interpreter: we call _Unwind_FindEnclosingFunction to
              // find out.
!             if ((_Jv_EndOfInterpreter == NULL || pc < _Jv_EndOfInterpreter)
!                 && (_Unwind_FindEnclosingFunction (pc) 
!                     == _Jv_StartOfInterpreter))
                {
                  frame[n].interp = (void *) interp_frame->self;
--- 93,102 ----
              // interpreter: we call _Unwind_FindEnclosingFunction to
              // find out.
!             if (_Jv_EndOfInterpreter == NULL 
!                 || (pc >= _Jv_StartOfInterpreter
!                     && pc < _Jv_EndOfInterpreter))
!               {
!                 if (_Unwind_FindEnclosingFunction (pc) 
!                     == _Jv_StartOfInterpreter)
                    {
                      frame[n].interp = (void *) interp_frame->self;
*************** gnu::gcj::runtime::StackTrace::fillInSta
*** 105,112 ****
                  // the interpreter.  We use that to refine our upper
                  // bound on where the interpreter ends.
-                 if (_Jv_EndOfInterpreter == NULL || pc < _Jv_EndOfInterpreter)
                    _Jv_EndOfInterpreter = pc;
                }
            }
  #endif // INTERPRETER
  
--- 108,115 ----
                      // the interpreter.  We use that to refine our upper
                      // bound on where the interpreter ends.
                      _Jv_EndOfInterpreter = pc;
                    }
                }
+           }
  #endif // INTERPRETER
  


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