<html><body><div style="color:#000; background-color:#fff; font-family:HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif;font-size:10pt"><div class="" style="">Hi </div><div class="" style=""><br class="" style=""></div><div style="color: rgb(0, 0, 0); font-size: 13px; font-family: HelveticaNeue, 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: transparent; font-style: normal" class="">We experimented a crash with kamailio 4.0.5 , it looks like a memory corruption.</div><div style="color: rgb(0, 0, 0); font-size: 13px; font-family: HelveticaNeue, 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: transparent; font-style: normal" class=""><br class="" style=""></div><div style="color: rgb(0, 0, 0); font-size: 13px; font-family: HelveticaNeue, 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: transparent; font-style: normal"
 class="">After an analyse of the core file,  it appears that it crashed while doing a str2int transformation (trying to convert the value of myvar to int):</div><div style="color: rgb(0, 0, 0); font-size: 13px; font-family: HelveticaNeue, 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: transparent; font-style: normal" class=""><br class="" style=""></div><div style="color: rgb(0, 0, 0); font-size: 13px; font-family: HelveticaNeue, 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: transparent; font-style: normal" class=""><br class="" style=""></div><div style="background-color: transparent" class=""> if (($(dlg_var("myvar"){s.int}) == 0) && some_other_condition ) {</div><div style="background-color: transparent" class=""><span class="Apple-tab-span" style="white-space:pre">    </span>do_something();</div><div style="background-color: transparent; color: rgb(0, 0, 0);
 font-size: 13px; font-family: HelveticaNeue, 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-style: normal;" class="">} <br class="" style=""></div><div style="color: rgb(0, 0, 0); font-size: 13px; font-family: HelveticaNeue, 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: transparent; font-style: normal" class=""><br></div><div style="color: rgb(0, 0, 0); font-size: 13px; font-family: HelveticaNeue, 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: transparent; font-style: normal;" class=""><br></div><div style="color: rgb(0, 0, 0); font-size: 13px; font-family: HelveticaNeue, 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: transparent; font-style: normal;" class=""><br></div><div style="color: rgb(0, 0, 0); font-size: 13px; font-family: HelveticaNeue, 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;
 background-color: transparent; font-style: normal;" class="">gdb output:</div><div style="color: rgb(0, 0, 0); font-size: 13px; font-family: HelveticaNeue, 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: transparent; font-style: normal;" class=""><br></div><div style="background-color: transparent" class="">(gdb) frame 4 </div><div style="background-color: transparent" class="">#4  0x00000000004bcb77 in rval_get_btype (h=0x7fffd69713d0, msg=0x7ffc8a58a4d0, rv=0x7ffc8a3dfc18, val_cache=0x7fffd69706a0) at rvalue.c:418</div><div style="background-color: transparent" class="">418in rvalue.c</div><div style="background-color: transparent" class="">(gdb) i loc </div><div style="background-color: transparent" class="">r_avp = 0x7fffd69709b0</div><div style="background-color: transparent" class="">tmp_avp_val = {n = -1975661232, s = {s = 0x7ffc8a3dcd50 "\034\001", len = -1973902128}, re =
 0x7ffc8a3dcd50}</div><div style="background-color: transparent" class="">avpv = 0x7fffd6970928</div><div style="background-color: transparent" class="">tmp_pval = {rs = {s = 0x7ffc8a5b86e0 "route[MAIN]: call-id=52e8c2b553540db4 from=987654321 to=+1234567890 : ACK ip=10.0.x.x", len = -1975658024}, ri = -694745968, flags = 32767}</div><div style="background-color: transparent" class="">pv = 0x7fffd69706a8</div><div style="background-color: transparent" class="">tmp = RV_NONE</div><div style="background-color: transparent" class="">ptype = 0x7ffc8a58a4d0</div><div style="background-color: transparent" class="">__FUNCTION__ = "rval_get_btype"</div><div style="background-color: transparent" class="">(gdb) p *pv</div><div style="background-color: transparent" class="">$8 = {rs = {s = 0x7069736f58652820 <Address 0x7069736f58652820 out of bounds>, len = 775106354}, ri = 0, flags = 4}</div><div style="background-color: transparent" class="">(gdb) p
 val_cache->c.pval </div><div style="background-color: transparent" class="">$9 = {rs = {s = 0x7069736f58652820 <Address 0x7069736f58652820 out of bounds>, len = 775106354}, ri = 0, flags = 4}   <-  the value of s is invalid, it's a string from a SIP message.</div><div style="color: rgb(0, 0, 0); font-size: 13px; font-family: HelveticaNeue, 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: transparent; font-style: normal" class=""><br></div><div style="color: rgb(0, 0, 0); font-size: 13px; font-family: HelveticaNeue, 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: transparent; font-style: normal;" class=""><br></div><div style="color: rgb(0, 0, 0); font-size: 13px; font-family: HelveticaNeue, 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: transparent; font-style: normal" class="">Full GDB backtrace and info locals here
 :</div><div style="color: rgb(0, 0, 0); font-size: 13px; font-family: HelveticaNeue, 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: transparent; font-style: normal" class=""><a href="http://pastebin.com/9S06nsyd" class="" style="">kamailio 4.0.5 crash - memory corruption ? - Pastebin.com</a><br class="" style=""></div><div style="width:450px; font-family: 'Georgia', 'Times', 'Times New Roman', 'serif'" contenteditable="false" id="enhancrCard_0" class=""><table class="" cellspacing="0" cellpadding="0" style="width:450px; height:170px; display: block"><tbody class="" style=""><tr class="" style=""><td colspan="6" class="" style="height: 1px; background-color: #e5e5e5"><div class="" style="height: 1px; background-color: #e5e5e5"></div></td></tr><tr class="" style=""><td rowspan="2" class="" style="width: 1px; background-color: #e5e5e5"><div class="" style="width: 1px; background-color: #e5e5e5"></div></td><td class=""
 rowspan="2" style="vertical-align: middle; width: 168px; height: 168px; background-color: #000000"><div class="" style="width: 168px" align="center"><a href="http://pastebin.com/9S06nsyd" class="" style="text-decoration: none !important; color: #000000 !important"><img alt="image" src="http://pastebin.com/i/fb2.jpg" class="" width="168" height="168" style="display: block; margin: auto"></a></div></td><td rowspan="2" class="" style="width: 1px; background-color: #e5e5e5"><div class="" style="width: 1px; background-color: #e5e5e5"></div></td><td class="" colspan="2" style="width: 100%; vertical-align: middle; font-family: 'Georgia', 'Times', 'Times New Roman', 'serif'"><div class="" style="line-height:16.5px; background-color: #ffffff; height: 130px; width: 279px"><div class="" style="word-wrap: break-word; padding: 7px 20px 0px 14px"><span class="" style=""></span><span class="" style=""></span><a href="http://pastebin.com/9S06nsyd" class=""
 style="text-decoration: none !important; color: #000000 !important"><span class="" style="margin: 0; font-weight: normal; font-size: 18px; line-height: 21px; max-height: 43px; color: #000000; overflow: hidden !important; display: inline-block">kamailio 4.0.5 crash - memory corruption ? - Pastebin.co...</span></a><div style="font-size: 13px; line-height: 20px; color: #999999; max-height: 81px; font-family: 'Georgia', 'Times', 'Times New Roman', 'serif';overflow: hidden" class="">(gdb) bt full #0  0x00007ffc822851e8 in str2sint (_s=0x7fffd69706a8, _r=0x7fffd69706b8) at ../../ut.h:681         i = 0         sign = 1 </div></div></div></td><td class="" rowspan="2" style="width: 1px; background-color: #e5e5e5"><div class="" style="width: 1px; background-color: #e5e5e5"></div></td></tr><tr class="" style=""><td class="" style="width: 100%; vertical-align: middle; font-family: 'Arial', 'Helvetica Neue', 'Helvetica',
 'sans-serif'"><div class="" style="font-size: 0pt; padding: 7px 20px 9px 15px"><a href="http://pastebin.com/9S06nsyd" class="" style="color: black; text-decoration: none !important;cursor:pointer !important" target="_blank"><span class="" style="display: inline-block; line-height: 11px; max-width: 179px; min-width: 119px; overflow: hidden; max-height: 13px; word-break: break-all"><span class="" style="vertical-align:middle; font-size: 9px; line-height: 11px; color: #999999; -moz-text-size-adjust: none; -ms-text-size-adjust: none; -webkit-text-size-adjust:none; text-size-adjust:none">View on <span style="font-weight: bold" class="">pastebin.com</span></span></span></a></div></td><td class="" style="vertical-align: middle; width: 100px; font-family: 'Arial', 'Helvetica Neue', 'Helvetica', 'sans-serif'"><div class="" style="padding: 9px 20px 12px 0px; max-width: 100px; min-width: 80px; overflow: hidden; text-align: right; line-height: 11px; max-height:
 13px; font-size: 0pt"><span class="" style="vertical-align:middle; font-size: 9px; line-height: 11px; color: #999999; -moz-text-size-adjust: none; -ms-text-size-adjust: none; -webkit-text-size-adjust:none; text-size-adjust:none">Preview by Yahoo</span></div></td></tr><tr class="" style=""><td class="" colspan="6" style="height: 1px; background-color: #e5e5e5"><div class="" style="height: 1px; background-color: #e5e5e5"></div></td></tr></tbody></table></div><div style="color: rgb(0, 0, 0); font-size: 13px; font-family: Georgia, Times, 'Times New Roman', serif; background-color: rgb(229, 229, 229); font-style: normal" class=""><br class="" style=""></div><div style="color: rgb(0, 0, 0); font-size: 13px; font-family: Georgia, Times, 'Times New Roman', serif; background-color: transparent; font-style: normal;" class=""><br></div><div style="color: rgb(0, 0, 0); font-size: 13px; font-family: Georgia, Times, 'Times New Roman', serif; background-color:
 transparent; font-style: normal;" class="">I still have the core file and I can help with further analysis  .</div><div style="color: rgb(0, 0, 0); font-size: 13px; font-family: Georgia, Times, 'Times New Roman', serif; background-color: transparent; font-style: normal;" class=""><br></div><div style="color: rgb(0, 0, 0); font-size: 13px; font-family: Georgia, Times, 'Times New Roman', serif; background-color: transparent; font-style: normal;" class=""><br></div><div style="color: rgb(0, 0, 0); font-size: 13px; font-family: Georgia, Times, 'Times New Roman', serif; background-color: transparent; font-style: normal;" class="">Regards,</div><div style="color: rgb(0, 0, 0); font-size: 13px; font-family: Georgia, Times, 'Times New Roman', serif; background-color: transparent; font-style: normal;" class="">Dragos</div><div style="color: rgb(0, 0, 0); font-size: 13px; font-family: HelveticaNeue, 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande',
 sans-serif; background-color: transparent; font-style: normal" class=""><br class="" style=""></div><div style="color: rgb(0, 0, 0); font-size: 13px; font-family: HelveticaNeue, 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: transparent; font-style: normal;" class="">PS: Kamailio still rocks.</div><div style="color: rgb(0, 0, 0); font-size: 13px; font-family: HelveticaNeue, 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: transparent; font-style: normal;" class=""><br></div></div></body></html>