Asterisk 1.0.8 or 1.0.9 compile just fine on AMD64, but when I try to connect any Sipura ATA (SPA-3000 or SPA-2002) Asterisk just crashes with output: Killed It seems to me it is killing Asterisk PID. Enclosed are two process core files: bt_full.txt thread_apply_all_bt.txt Reproducible: Always Steps to Reproduce: 1.start asterisk on AMD64 2.connect any Sipura ATA to network 3. Actual Results: Asterisk PID is Killed emerge info Portage 2.0.51.22-r2 (default-linux/amd64/2005.0, gcc-3.4.4, glibc-2.3.5-r1, 2.6.12-gentoo-r6 x86_64) ================================================================= System uname: 2.6.12-gentoo-r6 x86_64 AMD Athlon(tm) 64 Processor 3000+ Gentoo Base System version 1.6.13 dev-lang/python: 2.3.5 sys-apps/sandbox: 1.2.12 sys-devel/autoconf: 2.13, 2.59-r6 sys-devel/automake: 1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6 sys-devel/binutils: 2.15.92.0.2-r10 sys-devel/libtool: 1.5.18-r1 virtual/os-headers: 2.6.11-r2 ACCEPT_KEYWORDS="amd64" AUTOCLEAN="yes" CBUILD="x86_64-pc-linux-gnu" CFLAGS="-march=athlon64 -pipe -O2" CHOST="x86_64-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3.4/env /usr/kde/3.4/share/config /usr/kde/3.4/shutdown /usr/kde/3/share/config /usr/lib/X11/xkb /usr/share/config /usr/share/texmf/dvipdfm/config/ /usr/share/texmf/dvips/config/ /usr/share/texmf/tex/generic/config/ /usr/share/texmf/tex/platex/config/ /usr/share/texmf/xdvi/ /var/qmail/control" CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d" CXXFLAGS="-march=athlon64 -pipe -O2" DISTDIR="/usr/portage/distfiles" FEATURES="autoconfig distlocks sandbox sfperms strict" GENTOO_MIRRORS="ftp://ftp-stud.fht-esslingen.de/pub/Mirrors/gentoo/ ftp://gentoo.risq.qc.ca/ ftp://ftp.gtlib.cc.gatech.edu/pub/gentoo ftp://ftp.ussg.iu.edu/pub/linux/gentoo" MAKEOPTS="-j2" PKGDIR="/usr/portage/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" SYNC="rsync://rsync.gentoo.org/gentoo-portage" USE="amd64 X acl alsa apache2 arts avi berkdb bitmap-fonts cdr crypt cups curl dvd eds emboss encode esd fam foomaticdb fortran gif gimp gimpprint gpm gstreamer gtk gtk2 imagemagick imlib ipv6 java jpeg kde libwww lzw lzw-tiff mad mp3 mpeg mysql ncurses nls opengl pam pdflib perl png postgres ppds python qt quicktime readline samba scanner sdl slang spell ssl tcpd tetex tiff truetype-fonts type1-fonts usb userlocales xine xml2 xpm xv zlib userland_GNU kernel_linux elibc_glibc" Unset: ASFLAGS, CTARGET, LANG, LC_ALL, LDFLAGS, LINGUAS, PORTDIR_OVERLAY
Created attachment 68323 [details] bt full - from core
Created attachment 68324 [details] thread apply all bt - from core
ok, i've been abled to reproduce the problem with sipsak (thanks the information in your backtrace) asterisk dies while copying the tag= part from the SIP REGISTER message: "From: <sip:820@10.0.0.104>;tag=8f217fcbf04b422do0" the code: if (ast_strlen_zero(p->theirtag)) { from = get_header(req, "From"); from = ast_strcasestr(from, "tag="); if (from) { from += 4; here ---> strncpy(p->theirtag, from, sizeof(p->theirtag)-1); from = strchr(p->theirtag, ';'); if (from) *from = '\0'; } I'm going to dig further to find the cause of this
Changing utils.c Line:402 ast_strcasestr: changing: return ((char *)((unsigned int)haystack + (unsigned int)(offset - u1))); into: return ((char *)((unsigned long)haystack + (unsigned long)(offset - u1))); Fixes the problem #Joseph