[re] Java executables can abort trying to access a null pointer in a leaf function

Andrew Haley aph@redhat.com
Thu Feb 2 17:52:00 GMT 2006


tsuraan writes:
 > > Someone will need the assembly and/or object file for a small test case
 > > to examine the DWARF frame data.
 > 
 > I can send a tarball of the entire directory, if desired. It's 14 KB
 > without the core dump and 1.2MB with it. I don't know what filesize
 > starts to anger people on this list, so I'll just send the smaller
 > tarball for now. If the core is desired, I can send that too.
This looks OK to me: we are generating te null pointer check. 
Until we actually see the faulting instruction in gdb we're not going
to get anywhere. Just load your program into gdb, run it, and tel us
when it hits the SEGV.
FWIW, I'm guessing that this is actually a problem with debuginfo.
Andrew.
NullPointer.foo(NullPointer):
.LFB4:
 .loc 1 19 0
 pushl %ebp
.LCFI28:
 movl %esp, %ebp
.LCFI29:
 subl 8,ドル %esp
.LCFI30:
.LBB5:
 .loc 1 20 0
 movl NullPointer.j, %eax
 addl 5,ドル %eax
 movl %eax, NullPointer.j
 .loc 1 21 0
 movl 12(%ebp), %eax
 movl %eax, -4(%ebp)
 movl -4(%ebp), %eax
 testl %eax, %eax
 jne .L17
 call _Jv_ThrowNullPointerException
.L17:
 movl -4(%ebp), %eax
 movl %eax, %edx
 movl 4(%edx), %eax
 addl 4,ドル %eax
 movl %eax, 4(%edx)
.LBE5:
 .loc 1 22 0
 leave
 ret
.LFE4:


More information about the Java mailing list

AltStyle によって変換されたページ (->オリジナル) /