------- Additional Comments From dave at hiauly1 dot hia dot nrc dot ca 2005-08-21 20:52 ------- Subject: Re: FAIL: PR218
> pa32_fallback_frame_state should have taken care of this. Possibly, there is a bug there. However, the enclosed change appears to fix libgcj/23507 and partially fixes this PR. There appears to be a typo which doubles state->length in stacktrace.cc. This causes memcpy to segfault. The character of the fails changes when this is fixed: GC Warning: Out of Memory! Returning NIL! WARNING: program timed out. FAIL: PR218 execution - source compiled test UNTESTED: PR218 output - source compiled test The fix for libgcj/23507 is to use a function pointer comparison in the compare that tries to detect the interpreter. Dave -- J. David Anglin [EMAIL PROTECTED] National Research Council of Canada (613) 990-0752 (FAX: 952-6602) Index: stacktrace.cc =================================================================== RCS file: /cvs/gcc/gcc/libjava/stacktrace.cc,v retrieving revision 1.8 diff -u -3 -p -r1.8 stacktrace.cc --- stacktrace.cc 25 May 2005 23:24:05 -0000 1.8 +++ stacktrace.cc 21 Aug 2005 20:34:58 -0000 @@ -102,7 +102,7 @@ _Jv_StackTrace::UnwindTraceFn (struct _U // Check if the trace buffer needs to be extended. if (pos == state->length) { - int newLength = state->length *= 2; + int newLength = state->length * 2; void *newFrames = _Jv_AllocBytes (newLength * sizeof(_Jv_StackFrame)); memcpy (newFrames, state->frames, state->length * sizeof(_Jv_StackFrame)); state->frames = (_Jv_StackFrame *) newFrames; @@ -117,7 +117,7 @@ _Jv_StackTrace::UnwindTraceFn (struct _U // correspondance between call frames in the interpreted stack and occurances // of _Jv_InterpMethod::run() on the native stack. #ifdef INTERPRETER - if (func_addr == (_Unwind_Ptr) &_Jv_InterpMethod::run) + if ((void (*)(void)) func_addr == (void (*)(void)) &_Jv_InterpMethod::run) { state->frames[pos].type = frame_interpreter; state->frames[pos].interp.meth = state->interp_frame->self; -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23508