[asterisk-bugs] [JIRA] (ASTERISK-22351) Segmentation fault when trying to open asterisk console with asterisk -vvvvvvvvr
Walter Doekes (JIRA)
noreply at issues.asterisk.org
Fri Aug 23 01:55:03 CDT 2013
[ https://issues.asterisk.org/jira/browse/ASTERISK-22351?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=209505#comment-209505 ]
Walter Doekes commented on ASTERISK-22351:
------------------------------------------
Ah. The makefiles aren't adapted to disable optimization in editline.
Here:
{noformat}
--- main/editline/Makefile.orig 2013-08-23 08:50:56.471630807 +0200
+++ main/editline/Makefile 2013-08-23 08:50:32.244194710 +0200
@@ -17,7 +17,7 @@
AR = /usr/bin/ar
RANLIB = ranlib
CPPFLAGS = '-D__RCSID(x)=' '-D__COPYRIGHT(x)=' '-D__RENAME(x)=' '-D_DIAGASSERT(x)=' -I.
-CFLAGS = -pthread -I../..//include -I/usr/include/libxml2 -pipe -Wall -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -g3 -Wunused -Wdeclaration-after-statement -D_FORTIFY_SOURCE=2 -Wtrampolines -Wundef -Wmissing-format-attribute -Wformat=2 -O6 -march=native -O
+CFLAGS = -pthread -I../..//include -I/usr/include/libxml2 -pipe -Wall -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -g3 -Wunused -Wdeclaration-after-statement -D_FORTIFY_SOURCE=2 -Wtrampolines -Wundef -Wmissing-format-attribute -Wformat=2 -march=native
A_CFLAGS =
S_CFLAGS = -fPIC -DPIC
LDFLAGS =
{noformat}
(remove the -O and -O6)
{noformat}
$ touch main/editline/term.c
$ make -C main/editline
$ make
$ sudo make install
{noformat}
That should get you an unoptimized editline.
> Segmentation fault when trying to open asterisk console with asterisk -vvvvvvvvr
> --------------------------------------------------------------------------------
>
> Key: ASTERISK-22351
> URL: https://issues.asterisk.org/jira/browse/ASTERISK-22351
> Project: Asterisk
> Issue Type: Bug
> Security Level: None
> Affects Versions: 1.8.23.0, 11.5.0
> Environment: HP Proliant DL320e G8
> Debian Wheezy (kernel 3.2.0-4-amd64)
> DAHDI 2.7.0 (no cards installed)
> Libpri 1.4.14
> Reporter: A. Iglesias
>
> New installation in this server. After everything is installed and asterisk started, anytime a try to open an asterisk console with asterisk -vvvvvvvvvr I get a "Segmentation fault" and console doesn't open, but asterisk keeps running. If I stop asterisk and try to start it with asterisk -vvvvvvc, it fails in the same way.
> I've been doing some research, and found a guy with the same problem in the past, related whit the value of the TERM system variable. In my case is "xterm", but if I change it for a non existent value ('lalalala' for example) then console starts.
> Digging deeper, I've found that the problem is in main/editline/term.c , in line 960 when executing this:
> term_alloc(el, t, tgetstr((char *)t->name, &area));
> If I change this line with the one executed when TERM has an unknown value...
> term_alloc(el, t, NULL);
> ... and recompile, then console starts.
> the problem seems to be in the tgetstr function, because if I add a line just with this...
> tgetstr((char *)t->name, &area);
> ... I get the same error.
> I'll try to get core dump stuff, but maybe with this info is enough at the moment to find a solution. I've been trying to find the problem/solution studying the code, but no luck yet.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.asterisk.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the asterisk-bugs
mailing list