This is the mail archive of the java@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]

Re: [patch] Fix oddity in personality routine


Jack Howarth wrote:
> On Mon, Nov 30, 2009 at 10:09:17AM +0000, Andrew Haley wrote:
>> Jack Howarth wrote:
>>> On Sun, Nov 29, 2009 at 06:00:57PM +0000, Andrew Haley wrote:
>>>> Jack Howarth wrote:
>>>>> On Sat, Nov 28, 2009 at 10:43:26AM +0000, Andrew Haley wrote:
>>>>>> Jack Howarth wrote:
>>>>>>> On Fri, Nov 27, 2009 at 10:40:17AM +0000, Andrew Haley wrote:
>>>>>    I managed to get a build of libgcc at -O0 under darwin9 that I used to walk through
>>>>> the FSF gcc unwinder. The walk is at...
>>>>>
>>>>> http://gcc.gnu.org/bugzilla/attachment.cgi?id=19174
>>>>>
>>>>> and the list of the frames is at...
>>>>>
>>>>> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41991#c26
>>>>>
>>>>> Does this clarify the problem at all on intel darwin? Let me know if there
>>>>> is any other particular debug information I can provide.
>>>> It stops when unwinding java.lang.ClassLoader.loadClass(java.lang.String, boolean),
>>>> either because the unwinder data is buggy (probably) or because the unwinder
>>>> itself is buggy.
>>>   Would it help if I just used a breakpoint on uw_frame_state_for() and provided all
>>> of the unwinding info that is being processed? Might that clarify if the unwinder
>>> data is buggy?
>> Not really, no.  The only thing now is to debug the unwinder at the point
>> where the exception should be caught.  You're seeing a bus error in the
>> unwinder itself, which points to a failure to follow the chain of stack
>> frames.

>    I'll generate a complete debug walk from the last instance of the
> _Unwind_RaiseException breakpoint before the crash tonight. I started
> doing that this weekend but it was taking forever to complete the walk.
>    What code actually generates the unwind info in gcj?

The gcc back end.

> Is it from libffi?

libffi has its own unwind info.  It's written by hand, and it might be wrong.
look in libffi/x86/darwin64.S.

> I might also drop back to the gcc 4.3.x releases in darwin9 to see if 
> I can detect if this ever worked and if so when it regressed. However,
> considering that Andreas has managed to get this to be suppressed at
> times, I wonder if this issue has always been present on intel darwin
> and just tends to go latent at times.

That's quite possible, for sure.

> ps It is odd that the unwind info generated for compiling classes with
> gcj never seems to cause a problem. Could that be a clue as to the
> segment of code at fault? I noticed that the ecjx.c source is a dummy
> shell so I was unclear which code is used in gcj to compile java source
> but not classes.

I think you really need to concentrate on the instruction that's causing
the bus error.  What is is pointing at?  What it it trying to do?

The other thing that's odd is that there are a number of test cases in
the libgcj test suite that stress the interpreter (and therefore libffi)
quite a lot.  Are you really seeing 100% pass?

Andrew.


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