[gccsdk] Still seeing crash with shared library Firefox

Peter Naulls peter at chocky.org
Wed Aug 19 13:09:52 PDT 2009


This is something I mentioned some months ago.  None of the recent
fixes help.

   Register dump at 000b6fb4:

     a1:        0 a2:       c8 a3:        0 a4:      101
     v1: 649c5ae8 v2: 649c5af0 v3: 649c5b34 v4:    28268
     v5: 5cc40770 v6: 647cb808 sl:    b11f0 fp:    b35f4
     ip:       c8 sp:    b35c8 lr: 5cbaa244 pc: 5cc40784
     cpsr: 60000010

   5cc40770 : ..-å : e52d0004 : STR     R0,[R13,#-4]!
   5cc40774 : .0 ã : e3a03001 : MOV     R3,#1
   5cc40778 : .Àá : e180c001 : ORR     R12,R0,R1
   5cc4077c : .4á : e1833403 : ORR     R3,R3,R3,LSL #8
   5cc40780 : ...ã : e31c0003 : TST     R12,#3
   5cc40784 : .À. : 0491c004 : LDREQ   R12,[R1],#4
   5cc40788 : .8á : e1833803 : ORR     R3,R3,R3,LSL #16
   5cc4078c : $... : 1a000024 : BNE     &5CC40824
   5cc40790 : . \à : e05c2003 : SUBS    R2,R12,R3 


   (   b35f4) pc: 5c91a8e8 lr: 5c91b1dc sp:    b35f8 
nsLocalFile::FillStatCache()()
   (   b3610) pc: 5c91b174 lr: 5c9577d8 sp:    b3614 
nsLocalFile::GetFileSize(long long*)()

...


nsresult
nsLocalFile::FillStatCache() {
     if (stat(mPath.get(), &mCachedStat) == -1) {
         // try lstat it may be a symlink
         if (lstat(mPath.get(), &mCachedStat) == -1) {
             return NSRESULT_FOR_ERRNO();
         }
     }
     mHaveCachedStat = PR_TRUE;
     return NS_OK;
}


The assembler clearly belongs to string/_strcpy.s
in UnixLib.  This crash happens perhaps 3/4 of the
time, suggesting it's related to alignment handling
which the strcpy code does.   The call to strcpy is
presumably somewhere in the stat() code (i.e. __fsstat),
but I'm not sure where.  It doesn't happen with the
released, static Firefox.

Anyone want to speculate as to what's happening here?

I want to make a shared library release of Firefox -
especially to handle the security code for SSL sites -
but this is a big blocker.




More information about the gcc mailing list