dotgnu-libjit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Dotgnu-libjit] How Do I Debug a Memory Protection Error?


From: Noah Lavine
Subject: Re: [Dotgnu-libjit] How Do I Debug a Memory Protection Error?
Date: Sat, 16 Oct 2010 17:14:04 -0400

Hello,

The backtrace is just a bunch of functions in my program. (GNU Guile,
if you're interested.)

The registers look like this (from 'info registers'):

rax            0x8      8
rbx            0x7fff5fbfe800   140734799800320
rcx            0x0      0
rdx            0x10102e610      4311934480
rsi            0x10102e608      4311934472
rdi            0x10282feb8      4337106616
rbp            0x7fff5fbfea50   0x7fff5fbfea50
rsp            0x7fff5fbfe7f8   0x7fff5fbfe7f8
r8             0x0      0
r9             0x0      0
r10            0x10030ccdd      4298165469
r11            0x1007bb480      4303074432
r12            0x100709fd0      4302348240
r13            0x1002f3480      4298060928
r14            0x3      3
r15            0x10029a6d0      4297696976
rip            0x1007bb480      0x1007bb480
eflags         0x10246  66118
cs             0x27     39
ss             0x0      0
ds             0x0      0
es             0x0      0
fs             0x0      0
gs             0x0      0

Thanks,
Noah

On Sat, Oct 16, 2010 at 12:47 PM, Klaus Treichel <address@hidden> wrote:
> Hi Noah,
>
>> > What does the address look like on which the bus error is raised?
>> > The OS X abi for x86_64 should be SysV abi or do you know about any
>> > differences?
>>
>> The address is 0x00000001007bb480.
>>
>> > Does gdb print the contents of the address?
>> > like with print *(char *)(address)
>> >
>> > Enter the command "display /8i $pc" in gdb before running the faulting
>> > program and run it to get the assembly instructions where the error
>> > actually happens.
>>
>> It looks like the assembly is
>>
>> 0x1007bb480:  add    %bl,0x10070(%rsi)
>> 0x1007bb486:  add    %al,(%rax)
>> 0x1007bb488:  add    %al,(%rax)
>> 0x1007bb48a:  add    %al,(%rax)
>> 0x1007bb48c:  add    %al,(%rax)
>> 0x1007bb48e:  add    %al,(%rax)
>> 0x1007bb490:  xorb   $0x0,0x1007b(%rax)
>> 0x1007bb497:  add    %al,(%rax)
>>
>> So unless I misunderstand things, this looks like memory that never
>> had code put in it, which means the error is that a pointer was
>> changed somewhere. Is this accurate?
>>
> It looks like the region doesn't contain any code.
>
> What does a backtrace display at this point?
>
> And what's the contents of the registers?
>
> Cheers,
> Klaus
>
>



reply via email to

[Prev in Thread] Current Thread [Next in Thread]