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

Andrew Haley aph@redhat.com
Thu Feb 2 19:20:00 GMT 2006


David Daney writes:
 > Andrew Haley wrote:
 > > 
 > > 000000a0 0000001c 000000a4 FDE cie=00000000 pc=000000ec..00000121
 > >    LOC   CFA      r5   ra   
 > > 000000ec r4+4     u    c-4  
 > > 000000ed r4+8     c-8  c-4  
 > > 000000ef r5+8     c-8  c-4  
 > > 
 > > So, after the instruction at location 0xef the CFA (Caller Frame
 > > Address) is at r5 (AKA %ebp) + 8, the previous r5 (AKA %ebp) is saved
 > > at CFA - 8, and RA (Return Address) is at CFA - 4.
 > > 
 > > That looks right to me.  I'm guessing that the unwinder never found
 > > this info.
 > > 
 > Yeah, on linux/glibc it uses dl_iterate_pheader() (sp?) to find 
 > infromation about the loaded objects from there it can find the 
 > .eh_frame sections.

We can test that.  tsuraan, please replace that access via a null
pointer with simply

  throw new NullPointerException();

Andrew.



More information about the Java mailing list