bug-gawk
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [bug-gawk] bug in gawkapi.c:sym_update_real


From: Aharon Robbins
Subject: Re: [bug-gawk] bug in gawkapi.c:sym_update_real
Date: Tue, 18 Dec 2012 19:36:45 +0200
User-agent: Heirloom mailx 12.5 6/20/10

Hi Andy.

> On Mon, Dec 17, 2012 at 06:59:50PM -0500, Assaf Gordon wrote:
> > I see the same with my extension (which is very similar to yours).
>
> Yes.  Something is broken.
>
> > 4. Creating a variable with an extension *with* referencing it, makes a 
> > mess:
> >     $ gawk -d/dev/stdout -l extension/.libs/header.so 
> > 'BEGIN{create_variable("hello","world") ; print hello}' | grep hello
> >     hello: uninitialized scalar
> > This is likely not OK.
>
> This is the problem that I also found.  The sym_update call succeeds, but
> it is not actually setting the variable properly.
>
> Please try the attached patch.  It makes sure to update the "node->type"
> value from Node_var_new to Node_var.
>
> Arnold -- does this look correct to you?  It passes "make check".  Should the
> type be changed to Node_var even if the new value has type AWK_UNDEFINED?  Or
> should it remain Node_var_new in that case?

I agree, it's a bug. However, if the value is AWK_UNDEFINED then the
type should remain Node_var_new.

Please adjust your patch and push the fix.

Thanks!

Arnold



reply via email to

[Prev in Thread] Current Thread [Next in Thread]