< Previous by Date Date Index Next by Date >
  Thread Index  

[reSIProcate] illegale read during calling sip->isRequest()


resiprocate-devel,hi!

        I have met an illegale read problem during running the test program 
test503generator.
without the usleep, the program crashes with an illegale read error. As the 
judging sentence
begins with a ..sip... and the sip pointer is converted to using dynamic_cast, 
the sip should
point to a SipMessage class object when it's not null, how can this error occur?
        The system on which i run this program is equator's tetra board, this 
problem is not seen
in pc verion.
    And i compile the library with -Os flag, if i compile without this flag, 
this error would 
not occur. 

        I need your help, any of your help is greatly appreciated.

In file TransactionState.cxx:102

   SipMessage* sip = dynamic_cast<SipMessage*>(message);
   usleep(1);
   RESIP_STATISTICS(sip && sip->isExternal() && 
controller.mStatsManager.received(sip)
);
   // !jf! this is a first cut at elementary back pressure. hope it works :)
   if (sip && sip->isExternal() && sip->isRequest() &&
       sip->header(h_RequestLine).getMethod() != ACK &&
       controller.isTUOverloaded())
                        ..................


        

        sincerely,
                                

        zuobf
        zuobf@xxxxxxxxxxxxxxx
          2005-04-11