<html>
  <head>
    <meta content="text/html; charset=windows-1252"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    Hello,<br>
    <br>
    <div class="moz-cite-prefix">On 28/08/14 20:32, Jason Penton wrote:<br>
    </div>
    <blockquote
cite="mid:CAE=Kcrjz_epwOVsOuFKsxAv-ZmhaWX9T3RVVrMuX1+UpifQ2WA@mail.gmail.com"
      type="cite">
      <div dir="ltr">Hey Daniel,
        <div><br>
        </div>
        <div>I am puzzled by how this could make any difference? Could
          you explain? Is this dependent on the compiler used and
          whether or not void* arithmetic is allowed? <br>
        </div>
      </div>
    </blockquote>
    <br>
    void is incomplete type, of no defined data size, you cannot have:<br>
    <br>
    void x;<br>
    <br>
    There is nothing you can assign to x.<br>
    <br>
    An increment of a pointer jumps in memory with the size of its data
    type (e.g., char* is incremented by 1 byte, int* is incremented by 4
    bytes). But for void is mostly unknown behaviour. Based on web,
    apparently gcc considers sizeof(void) to be 1, but it is not a C
    standard. Others suggests should be zero (because that's why is a
    'void' pointer :-) ).<br>
    <br>
    Maybe Charles can say what compiler he was using.<br>
    <br>
    Cheers,<br>
    Daniel<br>
    <br>
    <blockquote
cite="mid:CAE=Kcrjz_epwOVsOuFKsxAv-ZmhaWX9T3RVVrMuX1+UpifQ2WA@mail.gmail.com"
      type="cite">
      <div dir="ltr">
        <div><br>
        </div>
        <div>Cheers</div>
        <div>Jason</div>
      </div>
      <div class="gmail_extra"><br>
        <br>
        <div class="gmail_quote">On Fri, Aug 22, 2014 at 1:17 PM,
          Daniel-Constantin Mierla <span dir="ltr"><<a
              moz-do-not-send="true" href="mailto:miconda@gmail.com"
              target="_blank">miconda@gmail.com</a>></span> wrote:<br>
          <blockquote class="gmail_quote" style="margin:0 0 0
            .8ex;border-left:1px #ccc solid;padding-left:1ex">
            <div bgcolor="#FFFFFF" text="#000000"> Hello,<br>
              <br>
              can you try this small patch?<br>
              <br>
              diff --git a/modules/pua_dialoginfo/pua_dialoginfo.c
              b/modules/pua_dialoginfo/pua_dialoginfo.c<br>
              index 1e88a04..0f02b2b 100644<br>
              --- a/modules/pua_dialoginfo/pua_dialoginfo.c<br>
              +++ b/modules/pua_dialoginfo/pua_dialoginfo.c<br>
              @@ -347,7 +347,7 @@ struct str_list* get_str_list(unsigned
              short avp_flags, int_str avp_name) {<br>
              <br>
                              memset( list_current, 0, len);<br>
              <br>
              -               list_current->s.s = (char*)( (void*)
              list_current + sizeof(struct str_list));<br>
              +               list_current->s.s = (char*)list_current
              + sizeof(struct str_list);<br>
                              list_current->s.len = avp_value.s.len;<br>
                             
              memcpy(list_current->s.s,avp_value.s.s,avp_value.s.len);<br>
              <br>
              It is for 4.1.<br>
              <br>
              I have some ongoing work to commit soon on the master
              branch. if you confirm it is working fine, I will push
              this patch as well and backport to 4.1.<br>
              <br>
              Cheers,<br>
              Daniel
              <div>
                <div class="h5"><br>
                  <br>
                  <div>On 22/08/14 13:03, Charles Chance wrote:<br>
                  </div>
                </div>
              </div>
              <blockquote type="cite">
                <div>
                  <div class="h5">
                    <div dir="ltr">Hi All,
                      <div><br>
                      </div>
                      <div>I wonder if some one could help me to
                        diagnose a recurring issue?</div>
                      <div><br>
                      </div>
                      <div>It happens at random times/intervals and
                        under varying load. But always, just before the
                        time of crash, I see the same critical error in
                        log:</div>
                      <div><br>
                      </div>
                      <div><font face="courier new, monospace">CRITICAL:
                          dialog [dlg_hash.c:841]: log_next_state_dlg():
                          bogus event 6 in state 1 for dlg 0xb0632134
                          [1367:5814] with clid '<a
                            moz-do-not-send="true"
                            href="mailto:0695dd7a346188dd24e7520e6c01092c@sip.sipcentric.com"
                            target="_blank">0695dd7a346188dd24e7520e6c01092c@sip.sipcentric.com</a>'
                          and tags 'as77c89620' ''<br>
                        </font></div>
                      <div><br>
                      </div>
                      <div><br>
                      </div>
                      <div>Analysing the core dump reveals:</div>
                      <div><br>
                      </div>
                      <div>
                        <div><font face="courier new, monospace">Core
                            was generated by `/usr/sbin/kamailio -P
                            /var/run/kamailio.pid -m 128 -M 4 -u
                            kamailio -g kamailio'.</font></div>
                        <div><font face="courier new, monospace">Program
                            terminated with signal 11, Segmentation
                            fault.</font></div>
                        <div><font face="courier new, monospace">#0
                             0x081a737c in parse_uri (buf=0x3a70006e
                            <Address 0x3a70006e out of bounds>,
                            len=275, uri=0xbfa2fd2c) at
                            parser/parse_uri.c:389</font></div>
                        <div><font face="courier new, monospace">389<span
                              style="white-space:pre-wrap"> </span>scheme=buf[0]+(buf[1]<<8)+(buf[2]<<16)+(buf[3]<<24);</font></div>
                      </div>
                      <div><br>
                      </div>
                      <div><font face="courier new, monospace">(gdb)
                          frame 1</font></div>
                      <div>
                        <div><font face="courier new, monospace"><br>
                          </font></div>
                        <div><font face="courier new, monospace">#1
                             0x008fe5dd in dialog_publish
                            (state=0x903f37 "Trying", ruri=0xb0b5fd00,
                            entity=0xb0632188, peer=0xb0632190,
                            callid=0xb0632180, initiator=1,
                            lifetime=7200, localtag=0x0, remotetag=0x0,
                            localtarget=0x0, </font></div>
                        <div><font face="courier new, monospace">   
                            remotetarget=0x0, do_pubruri_localcheck=1)
                            at dialog_publish.c:275</font></div>
                        <div><font face="courier new, monospace">275<span
                              style="white-space:pre-wrap"> </span>if
                            (parse_uri(ruri->s, ruri->len,
                            &ruri_uri) < 0) {</font></div>
                      </div>
                      <div><font face="courier new, monospace"><br>
                        </font></div>
                      <div><font face="courier new, monospace">(gdb) p
                          *ruri</font></div>
                      <div><font face="courier new, monospace"><br>
                        </font></div>
                      <div>
                        <div>
                          <div><font face="courier new, monospace">$1 =
                              {s = 0x3a70006e <Address 0x3a70006e out
                              of bounds>, len = 275}</font></div>
                        </div>
                        <div><font face="courier new, monospace"><br>
                          </font></div>
                        <div><font face="courier new, monospace">(gdb)
                            up</font></div>
                        <div><font face="courier new, monospace"><br>
                          </font></div>
                        <div>
                          <div><font face="courier new, monospace">#2
                               0x008ff277 in dialog_publish_multi
                              (state=0x903f37 "Trying",
                              ruris=0xb0b5fd00, entity=0xb0632188,
                              peer=0xb0632190, callid=0xb0632180,
                              initiator=1, lifetime=7200, localtag=0x0,
                              remotetag=0x0, </font></div>
                          <div><font face="courier new, monospace">   
                              localtarget=0x0, remotetarget=0x0,
                              do_pubruri_localcheck=1) at
                              dialog_publish.c:387</font></div>
                          <div><font face="courier new, monospace">387<span
                                style="white-space:pre-wrap"> </span>dialog_publish(state,&(ruris->s),entity,peer,callid,initiator,lifetime,localtag,remotetag,localtarget,remotetarget,do_pubruri_localcheck);</font></div>
                        </div>
                        <div><font face="courier new, monospace"><br>
                          </font></div>
                        <div><font face="courier new, monospace">(gdb) p
                            *ruris</font></div>
                        <div><font face="courier new, monospace"><br>
                          </font></div>
                        <div>
                          <div><font face="courier new, monospace">$2 =
                              {s = {s = 0x3a70006e <Address
                              0x3a70006e out of bounds>, len = 275},
                              next = 0x0}</font></div>
                        </div>
                        <div><font face="courier new, monospace"><br>
                          </font></div>
                        <div><font face="courier new, monospace">(gdb)
                            up</font></div>
                        <div><font face="courier new, monospace"><br>
                          </font></div>
                        <div>
                          <div><font face="courier new, monospace">#3
                               0x0090187a in __dialog_created
                              (dlg=0xb0632134, type=2, _params=0x6db064)
                              at pua_dialoginfo.c:470</font></div>
                          <div><font face="courier new, monospace">470<span
                                style="white-space:pre-wrap"> </span>dialog_publish_multi("Trying",

                              dlginfo->pubruris_caller,
                              &(dlg->from_uri),
                              (include_req_uri)?&(dlg->req_uri):&(dlg->to_uri),
                              &(dlg->callid), 1,
                              dlginfo->lifetime, 0, 0, 0, 0,
                              send_publish_flag==-1?1:0);</font></div>
                        </div>
                        <div><font face="courier new, monospace"><br>
                          </font></div>
                        <div><font face="courier new, monospace">(gdb) p
                            *dlginfo->pubruris_caller<br>
                          </font></div>
                        <div><font face="courier new, monospace"><br>
                          </font></div>
                        <div>
                          <div><font face="courier new, monospace">$3 =
                              {s = {s = 0x31590014 <Address
                              0x31590014 out of bounds>, len = 275},
                              next = 0xb0b5fd00}</font></div>
                        </div>
                        <div><font face="courier new, monospace"><br>
                          </font></div>
                        <div>
                          <div><font face="courier new, monospace">(gdb)
                              p *dlginfo->pubruris_caller->next</font></div>
                          <div><font face="courier new, monospace"><br>
                            </font></div>
                          <div><font face="courier new, monospace">$4 =
                              {s = {s = 0x3a70006e <Address
                              0x3a70006e out of bounds>, len = 275},
                              next = 0x0}</font></div>
                        </div>
                        <div><br>
                        </div>
                        <div><br>
                        </div>
                        <div>In config, for pua_dialoginfo we are
                          enabling the option "use_pubruri_avps" and
                          setting "pubruri_caller_avp" and
                          "pubruri_callee_avp" accordingly.</div>
                        <div><br>
                        </div>
                        <div>Therefore, in pua_dialoginfo.c it is using
                          get_str_list() function to set
                          dlginfo->pubruris_caller from the avp.</div>
                        <div><br>
                        </div>
                        <div>Could this be some race condition or
                          something completely different?</div>
                        <div><br>
                        </div>
                        <div>Thanks in advance,</div>
                        <div><br>
                        </div>
                        <div>Charles</div>
                        <div><br>
                        </div>
                        <div><br>
                        </div>
                      </div>
                    </div>
                    <br>
                    <font face="Helvetica, Arial, sans-serif"><font><span
                          style="font-size:10pt"><a
                            moz-do-not-send="true"
                            href="http://www.sipcentric.com/"
                            title="blocked::http://www.sipcentric.com/"
                            target="_blank">www.sipcentric.com</a><br>
                          <br>
                          Follow us on twitter <a
                            moz-do-not-send="true"
                            href="http://twitter.com/sipcentric"
                            title="blocked::http://twitter.com/sipcentric"
                            target="_blank">@sipcentric</a><br>
                          <br>
                          <font color="gray">Sipcentric Ltd. Company
                            registered in England & Wales no.
                            7365592.</font> <font color="gray">Registered


                            office: Faraday Wharf, Innovation Birmingham
                            Campus, Holt Street, Birmingham Science
                            Park, Birmingham B7 4BB.</font></span></font></font>
                    <br>
                    <fieldset></fieldset>
                    <br>
                  </div>
                </div>
                <pre>_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
<a moz-do-not-send="true" href="mailto:sr-users@lists.sip-router.org" target="_blank">sr-users@lists.sip-router.org</a>
<a moz-do-not-send="true" href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users" target="_blank">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users</a><span class="HOEnZb"><font color="#888888">
</font></span></pre>
                <span class="HOEnZb"><font color="#888888"> </font></span></blockquote>
              <span class="HOEnZb"><font color="#888888"> <br>
                  <pre cols="72">-- 
Daniel-Constantin Mierla
<a moz-do-not-send="true" href="http://twitter.com/#%21/miconda" target="_blank">http://twitter.com/#!/miconda</a> - <a moz-do-not-send="true" href="http://www.linkedin.com/in/miconda" target="_blank">http://www.linkedin.com/in/miconda</a>
Next Kamailio Advanced Trainings 2014 - <a moz-do-not-send="true" href="http://www.asipto.com" target="_blank">http://www.asipto.com</a>
Sep 22-25, Berlin, Germany ::: Oct 15-17, San Francisco, USA</pre>
                </font></span></div>
            <br>
            _______________________________________________<br>
            SIP Express Router (SER) and Kamailio (OpenSER) - sr-users
            mailing list<br>
            <a moz-do-not-send="true"
              href="mailto:sr-users@lists.sip-router.org">sr-users@lists.sip-router.org</a><br>
            <a moz-do-not-send="true"
              href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users"
              target="_blank">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users</a><br>
            <br>
          </blockquote>
        </div>
        <br>
        <br clear="all">
        <div><br>
        </div>
        -- <br>
        <div dir="ltr">
          <div>
            <table style="width:450pt" border="0" cellpadding="0"
              cellspacing="0" width="600">
              <tbody>
                <tr>
                  <td style="padding:0cm" valign="top">
                    <br>
                  </td>
                </tr>
              </tbody>
            </table>
            <table style="font-family:monospace" border="0"
              cellpadding="0" cellspacing="0" width="320px">
              <tbody>
                <tr>
                  <td
style="font-family:Arial,sans-serif;font-size:16px;color:rgb(117,179,67);line-height:18px;padding-left:15px;padding-top:10px"><strong>Jason
                      Penton</strong></td>
                </tr>
                <tr>
                  <td
style="font-family:Arial,sans-serif;font-size:16px;color:rgb(117,179,67);line-height:18px;padding-left:15px;padding-top:10px"><strong>Senior
                      Manager: Applications and Services</strong></td>
                </tr>
                <tr>
                  <td
style="font-family:Arial,sans-serif;font-size:16px;color:rgb(134,145,154);line-height:18px;padding-left:15px;padding-top:10px"><strong>Smile
                      Communications Pty (Ltd)</strong></td>
                </tr>
                <tr>
                  <td>
                    <table cellpadding="0" cellspacing="0" width="100%">
                      <tbody>
                        <tr>
                          <td
style="font-family:Arial,sans-serif;font-size:16px;color:rgb(134,145,154);line-height:18px;padding-left:15px;padding-top:10px"
                            width="27%"><strong>Mobile:</strong></td>
                          <td
style="font-family:Arial,sans-serif;font-size:16px;color:rgb(134,145,154);line-height:18px;padding-left:10px;padding-top:10px"
                            width="73%">
                            +27 (0) 83 283 7000</td>
                        </tr>
                        <tr>
                          <td
style="font-family:Arial,sans-serif;font-size:16px;color:rgb(134,145,154);line-height:18px;padding-left:15px;padding-top:10px"><strong>Skype:</strong></td>
                          <td
style="font-family:Arial,sans-serif;font-size:16px;color:rgb(134,145,154);line-height:18px;padding-left:10px;padding-top:10px">jason.barry.penton</td>
                        </tr>
                      </tbody>
                    </table>
                  </td>
                </tr>
                <tr>
                  <td
style="font-family:Arial,sans-serif;font-size:16px;color:rgb(117,179,67);line-height:18px;padding-left:15px;padding-top:10px"><a
                      moz-do-not-send="true"
                      href="mailto:name.surname@smilecoms.com"
                      style="font-family:Arial;color:rgb(117,179,67);text-decoration:none"
                      target="_blank">jason.penton@smilecoms.com</a></td>
                </tr>
                <tr>
                  <td
style="font-family:Arial,sans-serif;font-size:16px;color:rgb(117,179,67);line-height:18px;padding-left:15px;padding-top:10px"><a
                      moz-do-not-send="true"
                      href="http://www.smilecoms.com/"
                      style="font-family:Arial;color:rgb(117,179,67)"
                      target="_blank">www.smilecoms.com</a><br>
                    <img moz-do-not-send="true"
src="http://196.33.227.129/%7Esmlcoms/sigs/pty/images/smile_signature_07_09.jpg"
                      height="144" width="420"><br>
                  </td>
                </tr>
              </tbody>
            </table>
          </div>
          <br>
        </div>
      </div>
      <br>
      <span><font color="#888888">
          <pre>This email is subject to the disclaimer of Smile Communications at <a moz-do-not-send="true" href="http://www.smilecoms.com/home/email-disclaimer/" target="_blank">http://www.smilecoms.com/home/<wbr>email-disclaimer/</a></pre>
        </font></span>
    </blockquote>
    <br>
    <pre class="moz-signature" cols="72">-- 
Daniel-Constantin Mierla
<a class="moz-txt-link-freetext" href="http://twitter.com/#!/miconda">http://twitter.com/#!/miconda</a> - <a class="moz-txt-link-freetext" href="http://www.linkedin.com/in/miconda">http://www.linkedin.com/in/miconda</a>
Next Kamailio Advanced Trainings 2014 - <a class="moz-txt-link-freetext" href="http://www.asipto.com">http://www.asipto.com</a>
Sep 22-25, Berlin, Germany ::: Oct 15-17, San Francisco, USA</pre>
  </body>
</html>