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: Andrew J. Schorr
Subject: Re: [bug-gawk] bug in gawkapi.c:sym_update_real
Date: Mon, 17 Dec 2012 19:55:29 -0500
User-agent: Mutt/1.5.21 (2010-09-15)

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?

Regards,
Andy

Attachment: gawkapi.patch
Description: Text document


reply via email to

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