<div dir="ltr">Hi Juha,<div><br></div><div>Okay I have found the root cause....</div><div><br></div><div>If the XML data for string parameters is sent in as follows:</div><div><br></div><div><?xml version="1.0" encoding="UTF-8"?><methodCall><methodName>ulscscf.showimpu</methodName><params><param><value><font color="#cc0000"><string></font>somestring<font color="#ff0000"></string></font></value></param></params></methodCall><br>
</div><div><br></div><div>then everything is fine. BUT, if you send the following (viz. string tags omitted - done by default in JAVA XML:</div><div><br></div><div><?xml version="1.0" encoding="UTF-8"?><methodCall><methodName>ulscscf.showimpu</methodName><params><param><value>somestring</value></param></params></methodCall></div>
<div><br></div><div>you will get a segfault.</div><div><br></div><div>Ideally we should return a fault string here - if "parsing" fails in xmllibrary...</div><div><br></div><div>Cheers</div><div>JasonĀ </div></div>
<div class="gmail_extra"><br><br><div class="gmail_quote">On Mon, May 19, 2014 at 6:52 PM, Jason Penton <span dir="ltr"><<a href="mailto:jason.penton@gmail.com" target="_blank">jason.penton@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 dir="ltr">Hi Juha,<div><br></div><div>There is a via. The message is handled correctly and in fact responded to correctly, but the seg fault happens very soon after. I have localized the problem to passing in a parameter in the RPC input request.</div>

<div><br></div><div>As soon as code has something like the following before the RPC response, it crashes.....</div><div><br></div><div>str impu;</div><div><div>if (rpc->scan(ctx, "S", &impu) < 1) {</div>

<div><span style="white-space:pre-wrap">          </span>rpc->fault(ctx, 400, "required IMPU argument");</div><div><span style="white-space:pre-wrap">             </span>return;</div><div>}</div></div><div><br></div><div>
if I remove the above, and hardwire the return RPC values/data, everything is fine, add it back, even if not being used, and crash is back.</div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div>
</div><div class="HOEnZb"><div class="h5">
<div class="gmail_extra"><br><br><div class="gmail_quote">On Mon, May 19, 2014 at 5:51 PM, Juha Heinanen <span dir="ltr"><<a href="mailto:jh@tutpro.com" target="_blank">jh@tutpro.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

<div>Jason Penton writes:<br>
<br>
> Sorry, I sent the incorrect bt,<br>
<br>
</div>based on the new bt is looks like the incoming xmlrpc request does not<br>
have via header and crash happens when that non-existent via header is<br>
freed.<br>
<br>
do you have ngrep of the request?<br>
<div><div><br>
-- juha<br>
<br>
_______________________________________________<br>
sr-dev mailing list<br>
<a href="mailto:sr-dev@lists.sip-router.org" target="_blank">sr-dev@lists.sip-router.org</a><br>
<a href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev" target="_blank">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev</a><br>
</div></div></blockquote></div><br></div>
</div></div></blockquote></div><br></div>