[asterisk-dev] [svn-commits] rizzo: trunk r93603 - in /trunk: channels/ include/asterisk/ main/ res/ utils/
Luigi Rizzo
rizzo at icir.org
Thu Dec 20 04:13:24 CST 2007
On Wed, Dec 19, 2007 at 02:14:13PM -0800, Luigi Rizzo wrote:
> On Wed, Dec 19, 2007 at 10:36:34PM +0100, Michiel van Baak wrote:
> > On 14:26, Wed 19 Dec 07, Jason Parker wrote:
...
> > > This _SETVAR macro may not be working quite as you had intended. If you set
> > > autosystemname=yes in asterisk.conf, you'll get a segfault in main(), in the
> > > ast_copy_string() call. I think the reason for this is that
> > > ast_config_AST_SYSTEM_NAME is being set to "" initially, and then set again later.
> > >
> >
> > I run into the same segfault on OBSD 4.2
>
> ok probably the compiler allocates const char foo[N] in
> readonly memory so attempts to write to it cause the trap.
> Will change the way those variables are handled:
>
> static char our_AST_SYSTEM_NAME[N];
> const char *ast_config_AST_SYSTEM_NAME = our_AST_SYSTEM_NAME;
>
> and write to the static variables instead.
just committed a fix, if you can check...
cheers
luigi
More information about the asterisk-dev
mailing list