[haiku-development] Re: Question on the arch_cpu_user_memcpy function

  • From: David McPaul <dlmcpaul@xxxxxxxxx>
  • To: haiku-development@xxxxxxxxxxxxx
  • Date: Sun, 4 Oct 2009 12:06:44 +1000

2009/10/3 Ingo Weinhold <ingo_weinhold@xxxxxx>:
>
> On 2009-10-02 at 09:06:57 [+0800], David McPaul <dlmcpaul@xxxxxxxxx> wrote:
>>
>> I am tracing through an issue I am having when using the profile tool
>> to profile media add-ons
>
> It's not by any chance the problem you mentioned month ago and still haven't
> created a ticket for? :-)

Yeah same one, I am trying to get a better understanding of what is happening.

>> I get a General Protection Fault code 0x0 in the arch_cpu_user_memcpy
>> function when the profiler is trying to get the frame stack details
>>
>> The registers printed in the error stack trace show that the src ptr is NULL
>>
>> My reading of the code suggests that the error should be trapped and
>> -1 returned by the function.
>>
>> Am I wrong here, does the fault handler added not handle a null pointer?
>
> It should indeed handle anything that causes a page fault, including read or
> write access to address 0.

Well, testing for null src address AND src address > fffffff0 lets me
profile add-ons.

I have no idea why the fault handler is not working here.

I am also not certain the correct functions are being tracked.  Some
of the functions mentioned in the list look wrong to me.

> Unless you insist on fixing the problem yourself, please create a ticket. If
> I can reproduce the bug, I'll fix it. Otherwise I or others might at least be
> able to add helpful insights.

I have raised ticker 4714

-- 
Cheers
David

Other related posts: