[asterisk-bugs] [JIRA] (ASTERISK-22351) Segfault in LIBEDIT_INTERNAL after tgetstr()

A. Iglesias (JIRA) noreply at issues.asterisk.org
Tue Aug 27 02:11:03 CDT 2013


    [ https://issues.asterisk.org/jira/browse/ASTERISK-22351?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=209650#comment-209650 ] 

A. Iglesias commented on ASTERISK-22351:
----------------------------------------

Yes, you're probably right about compiling error. In case of putting something, maybe should be just a warning, something like "check if libncurses-dev is installed" or similar. Anyway, your term.c patch should avoid the segfault, although I don't know if libncurses-dev is necessary in other parts of asterisk.

What I still don't understand is why the install-prereq script doesn't install this package. Yesterday I checked other machine installed with Wheezy in the same way, and the package wasn't installed either. I ran the script again, and it returned that everything is OK (nothing installed), while it should have installed this package. In fact, if you remove the linbcurses5-dev package and run the script, nothing happens.

Next time I install a new machine, I'll pay attention at the script execution in a new system, to see if it install everything or return some kind of warning.

I'm not sure what's the best option for this case. Honestly, I think is better to find a way that assure the package libncurses5-dev is installed, to avoid future problems.
                
> Segfault in LIBEDIT_INTERNAL after tgetstr()
> --------------------------------------------
>
>                 Key: ASTERISK-22351
>                 URL: https://issues.asterisk.org/jira/browse/ASTERISK-22351
>             Project: Asterisk
>          Issue Type: Bug
>      Security Level: None
>          Components: Core/General
>    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
>         Attachments: config.h, config.log, config.status, issueA22351_libedit_internal_without_ncurses_dev.patch
>
>
> 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