pjsip test application: bus error

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Update:

It seems that this test will not run correctly unless 
PJSIP_UNESCAPE_IN_PLACE is set to 0.



Michael Broughton wrote:
> Hello,
>
> I have been running with the same version of pjsip for over a year 
> now, and I would like to update to version 1.x.
>
> So I checked out the latest code from svn and I built it with the 
> following config:
>
> ./aconfigure --disable-sound CFLAGS="-O0 -g"
>
> This is on a FreeBSD 6.2 x86_64 box. I usually compile with -O2 but I 
> had to turn that off because the pjsip-test application is giving me a 
> core dump. I have run all of the other test applications without error.
>
> It took a while to track this one down, but it seems to be coming from 
> pjsip/src/test-pjsip/msg_test.c in the function hdr_test():
>
> (gdb) print hdr_test_data[8]
> $30 = {hname = 0x464032 "Contact", hshort_name = 0x46403a "m", 
> hcontent = 0x464050 
> "<sip:host;][/:&+$=][/:&+$;p1=\";\">;p0=a;p1=\"ab:;cd\";p2=ab%3acd;p3", 
> test = 0x406dc0 <hdr_test_contact1>, flags = 0}
>
> The problem is with the 'hcontent' string, which is located in a 
> read-only memory section. It looks like the test is trying to unescape 
> the "%3a" in place. This results in a coredump (Bus error). Here is 
> the backtrace and memory section in question:
>
> (gdb) backtrace
> #0  0x000000000045031e in pj_scan_get_unescape 
> (scanner=0x7fffffffe3a0, spec=0x57c8b0, out=0x7fffffffe250) at 
> ../src/pjlib-util/scanner.c:310
> #1  0x000000000042830d in parser_get_and_unescape 
> (scanner=0x7fffffffe3a0, pool=0x2c57000, spec=0x57c4b0, 
> unesc_spec=0x57c8b0, token=0x7fffffffe250) at 
> ../src/pjsip/sip_parser.c:217
> #2  0x00000000004282b4 in parse_param_imp (scanner=0x7fffffffe3a0, 
> pool=0x2c57000, pname=0x7fffffffe260, pvalue=0x7fffffffe250, 
> spec=0x57c4b0, esc_spec=0x57c8b0, option=0) at 
> ../src/pjsip/sip_parser.c:1102
> #3  0x0000000000428371 in pjsip_parse_param_imp 
> (scanner=0x7fffffffe3a0, pool=0x2c57000, pname=0x7fffffffe260, 
> pvalue=0x7fffffffe250, option=0) at ../src/pjsip/sip_parser.c:1113
> #4  0x0000000000428430 in int_parse_param (scanner=0x7fffffffe3a0, 
> pool=0x2c57000, pname=0x7fffffffe260, pvalue=0x7fffffffe250, option=0) 
> at ../src/pjsip/sip_parser.c:1137
> #5  0x00000000004293b3 in int_parse_contact_param (hdr=0x2c570a8, 
> scanner=0x7fffffffe3a0, pool=0x2c57000) at ../src/pjsip/sip_parser.c:1679
> #6  0x0000000000429620 in parse_hdr_contact (ctx=0x7fffffffe370) at 
> ../src/pjsip/sip_parser.c:1729
> #7  0x000000000042a47b in pjsip_parse_hdr (pool=0x2c57000, 
> hname=0x7fffffffe480, buf=0x464050 
> "<sip:host;][/:&+$=][/:&+$;p1=\";\">;p0=a;p1=\"ab:;cd\";p2=ab%3acd;p3", 
> size=64, parsed_len=0x7fffffffe478) at ../src/pjsip/sip_parser.c:2146
> #8  0x000000000040785a in hdr_test () at 
> ../src/test-pjsip/msg_test.c:1744
> #9  0x0000000000407b90 in msg_test () at 
> ../src/test-pjsip/msg_test.c:1824
> #10 0x000000000040a45a in test_main () at ../src/test-pjsip/test.c:298
> #11 0x0000000000402e5d in main (argc=1, argv=0x7fffffffebd0) at 
> ../src/test-pjsip/main.c:80
>
> $ objdump -h pjsip/bin/pjsip-test-x86_64-unknown-freebsd6.2
>
> pjsip/bin/pjsip-test-x86_64-unknown-freebsd6.2:     file format 
> elf64-x86-64
>
> Sections:
> Idx Name          Size      VMA               LMA               File 
> off  Algn
> ...
> 12 .rodata       0001320a  0000000000463100  0000000000463100  
> 00063100  2**5
>                  CONTENTS, ALLOC, LOAD, READONLY, DATA
> ...
>
> I am wondering if this is a problem with the test? Or do I have 
> something mis-configured?
>

-- 
Michael Broughton, Advanis

Unintended Recipient & Unauthorized Use of E-Mail:
This message and attachments may contain confidential or privileged
information that is intended only for the named recipient of this
e-mail. Any unauthorized use or distribution is not permitted. If you
have received this e-mail in error, deleting the e-mail and notifying
the sender would be appreciated. Thank you.




[Index of Archives]     [Asterisk Users]     [Asterisk App Development]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [Linux API]
  Powered by Linux