<p>Against current git master.</p>
<pre><code>henning@static:~/repositories/kamailio$ cat etc/crash-4.cfg
#!KAMAILIO
loadmodule "sl.so"
request_route {
switch (1) {
case -1:
send_reply("404", "Not Found");
case -2:
send_reply("405",("Method Not Allowed");
exit;
}
</code></pre>
<blockquote>
<p>$ ./src/kamailio -f etc/crash-4.cfg -L src/modules/ -Y /tmp -E -d<br>
0(2278) CRITICAL: [core/cfg.y:3549]: yyerror_at(): parse error in config file /home/henning/repositories/kamailio/etc/crash-4.cfg, line 10, column 43: syntax error<br>
0(2278) CRITICAL: [core/cfg.y:3549]: yyerror_at(): parse error in config file /home/henning/repositories/kamailio/etc/crash-4.cfg, line 10, column 43: '('')' expected (function call)<br>
Segmentation fault (core dumped)<br>
henning@static:~/repositories/kamailio$ gdb src/kamailio core<br>
Reading symbols from src/kamailio...done.<br>
[New LWP 2278]<br>
Core was generated by `./src/kamailio -f etc/crash-4.cfg -L src/modules/ -Y /tmp -E -d'.<br>
Program terminated with signal SIGSEGV, Segmentation fault.<br>
#0 0x00005580cdbd131e in append_action (a=0x7fad84db9300, b=0x7fad84db97f8) at core/route_struct.c:147<br>
147 for(t=a; t->next; t=t->next);<br>
(gdb) bt<br>
#0 0x00005580cdbd131e in append_action (a=0x7fad84db9300, b=0x7fad84db97f8) at core/route_struct.c:147<br>
<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="31891578" data-permission-text="Title is private" data-url="https://github.com/kamailio/kamailio/issues/1" data-hovercard-type="issue" data-hovercard-url="/kamailio/kamailio/issues/1/hovercard" href="https://github.com/kamailio/kamailio/issues/1">#1</a> 0x00005580cdf9208b in yyparse () at core/cfg.y:2428<br>
<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="41491271" data-permission-text="Title is private" data-url="https://github.com/kamailio/kamailio/issues/2" data-hovercard-type="pull_request" data-hovercard-url="/kamailio/kamailio/pull/2/hovercard" href="https://github.com/kamailio/kamailio/pull/2">#2</a> 0x00005580cdb96c11 in main (argc=9, argv=0x7ffc2d9f6a68) at main.c:2309<br>
(gdb) f 0<br>
#0 0x00005580cdbd131e in append_action (a=0x7fad84db9300, b=0x7fad84db97f8) at core/route_struct.c:147<br>
147 for(t=a; t->next; t=t->next);<br>
(gdb) p a<br>
$1 = (struct action *) 0x7fad84db9300<br>
(gdb) p b<br>
$2 = (struct action *) 0x7fad84db97f8<br>
(gdb) p t<br>
$3 = (struct action *) 0x80<br>
(gdb) p a->next<br>
$4 = (struct action *) 0x80<br>
(gdb) p *t<br>
Cannot access memory at address 0x80</p>
</blockquote>
<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/kamailio/kamailio/issues/2239?email_source=notifications&email_token=ABO7UZLR5WIXQYKRMKN6CC3RF7P3FA5CNFSM4LCPBDW2YY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4IS3QYXQ">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/ABO7UZOSB2QWOCNIIYKRQFTRF7P3FANCNFSM4LCPBDWQ">unsubscribe</a>.<img src="https://github.com/notifications/beacon/ABO7UZPEFHK6NS6M3BRL2VLRF7P3FA5CNFSM4LCPBDW2YY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4IS3QYXQ.gif" height="1" width="1" alt="" /></p>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/kamailio/kamailio/issues/2239?email_source=notifications\u0026email_token=ABO7UZLR5WIXQYKRMKN6CC3RF7P3FA5CNFSM4LCPBDW2YY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4IS3QYXQ",
"url": "https://github.com/kamailio/kamailio/issues/2239?email_source=notifications\u0026email_token=ABO7UZLR5WIXQYKRMKN6CC3RF7P3FA5CNFSM4LCPBDW2YY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4IS3QYXQ",
"name": "View Issue"
},
"description": "View this Issue on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>