[asterisk-bugs] [Asterisk 0017482]: [patch] [regression] el_gets re-entered after el_end (at shutdown) causes segfault

Asterisk Bug Tracker noreply at bugs.digium.com
Mon Jun 28 15:34:09 CDT 2010


The following issue requires your FEEDBACK. 
====================================================================== 
https://issues.asterisk.org/view.php?id=17482 
====================================================================== 
Reported By:                wdoekes
Assigned To:                
====================================================================== 
Project:                    Asterisk
Issue ID:                   17482
Category:                   Core/General
Reproducibility:            always
Severity:                   trivial
Priority:                   normal
Status:                     feedback
Asterisk Version:           SVN 
JIRA:                       SWP-1671 
Regression:                 Yes 
Reviewboard Link:            
SVN Branch (only for SVN checkouts, not tarball releases): N/A 
SVN Revision (number only!): 268572 
Request Review:              
====================================================================== 
Date Submitted:             2010-06-07 04:09 CDT
Last Modified:              2010-06-28 15:34 CDT
====================================================================== 
Summary:                    [patch] [regression]  el_gets re-entered after
el_end (at shutdown) causes segfault
Description: 
Hi,

when running the asterisk trunk build with -c and -cv respectively, I get
a segfault when hitting CTRL-C on the latter.

The cause is that el_gets (main/editline/read.c) gets re-entered after
el_end has been called in quit_handler (main/asterisk.c). In el_gets, it
trips on

retval = (*el->el_map.func[cmdnum]) (el, ch); // line 475

because el_map.func is NULL (cleaned by el_end).

Possible solution:
- move el_end to after all ast_verbose and ast_debug has been called as in
the attached patch.

A different solution would be to fix so el_gets doesn't get called after
el_end has been called.


Regards,
Walter Doekes
OSSO B.V.
======================================================================
Relationships       ID      Summary
----------------------------------------------------------------------
has duplicate       0017490 Seg faulting when stopping asterisk
====================================================================== 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2010-06-28 15:34 tilghman       Status                   ready for testing =>
feedback
======================================================================




More information about the asterisk-bugs mailing list