[re] Java executables can abort trying to access a null pointer in a leaf function
tsuraan
tsuraan@gmail.com
Thu Feb 2 17:34:00 GMT 2006
> Ok, so please provide us with the assembly source for the method that
> does the null pointer access. Use gcj -save-temps.
I think the relevant source is
.globl _ZN11NullPointer3fooEPS_
.type _ZN11NullPointer3fooEPS_, @function
_ZN11NullPointer3fooEPS_:
.LFB4:
.loc 1 19 0
pushl %ebp
.LCFI28:
movl %esp, %ebp
.LCFI29:
subl $8, %esp
.LCFI30:
.LBB5:
.loc 1 20 0
movl _ZN11NullPointer1jE, %eax
addl $5, %eax
movl %eax, _ZN11NullPointer1jE
.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:
.size _ZN11NullPointer3fooEPS_, .-_ZN11NullPointer3fooEPS_
.align 2
.globl _ZN11NullPointerC1Ev
.type _ZN11NullPointerC1Ev, @function
I'm also attaching the entire NullPointer.s file in case I'm
misreading the assembly (which I probably am)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: NullPointer.s.gz
Type: application/x-gzip
Size: 3863 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/java/attachments/20060202/59b62bfb/attachment.bin>
More information about the Java
mailing list