[Home]

Summary:ASTERISK-18728: Segfault in app_stack.so on Solaris
Reporter:Ben Klang (bklang)Labels:
Date Opened:2011-10-17 22:42:30Date Closed:2011-12-19 15:39:39.000-0600
Priority:MajorRegression?Yes
Status:Closed/CompleteComponents:Applications/app_stack
Versions:SVN Frequency of
Occurrence
Constant
Related
Issues:
is duplicated byASTERISK-19062 app_stack: cannot access memory at address 0x0
is related toASTERISK-18950 weak (linker) attribute handling for MAC/OS in optional_api.h breaks x86 executable (seg fault)
Environment:SunOS grant 5.11 snv_111b i86pc i386 i86pc SolarisAttachments:( 0) 20111027__ASTERISK-18728.diff
( 1) gdb.txt
Description:I had a working build of Asterisk 10 from SVN from about 2 weeks ago that was working fine.  Today I updated to the latest from the Asterisk 10 branch and the system immediately segfaults on startup.  I've isolated the fault so that it does not occur if I noload => app_stack.so.  However, looking at the changelog, app_stack has not been changed since July 21.  Stacktrace attached.
Comments:By: Ben Klang (bklang) 2011-10-17 22:45:32.120-0500

This core dump occurred on a booted, stable Asterisk 10 system.  The final CLI command typed was "module load app_stack.so"

By: Tilghman Lesher (tilghman) 2011-10-27 12:08:15.087-0500

Debugged via IRC from Astricon.

Reporter's autoconfig.h looks like this: http://pastebin.com/0mk2s3Fb which indicates that Solaris also defines the 'weak' attribute.  So the solution should be to instead detect a Mac OS X define that we use in the top-level Makefile, then conditionally use 'weak' or 'weak_import' depending upon the environment version.

By: Ben Klang (bklang) 2011-11-02 22:43:34.522-0500

The patch as posted by Tilghman appears to resolve the issue.  I can now load app_stack on my Asterisk 10 instance without a segfault.  It has been running stable since this morning.

By: Ovidiu Sas (ovi) 2011-12-19 13:13:20.525-0600

This issue is present on 1.8.8.0 (see ASTERISK-19062).