[antlr-interest] C runtime: crash in dupNode; UP/DOWN/etc. missing factory?

Ned Gill thomas.gill at csr.com
Mon Jun 1 08:26:41 PDT 2009


On Mon, 01 Jun 2009 16:01:19 +0100, Ned Gill  
<thomas.gill at csr.com> wrote:

> I believe the node it's trying to duplicate is one of
> stream->UP/DOWN/EOF_NODE/INVALID_NODE initialised in
> antlr3CommonTreeNodeStreamNew (in antlr3commontreenodestream.c). It looks
> like those nodes never have their factory set. Is is safe to create a new
> factory there just for those nodes? Is there a better fix I should
> consider?

I've fixed it by using the arboretum from stream->adaptor. Diff attached.  
I've no idea whether this is generally safe, or a good idea :) Comments  
welcome.


Ned.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: antlr3commontreenodestream.c.diff
Type: application/octet-stream
Size: 1574 bytes
Desc: not available
Url : http://www.antlr.org/pipermail/antlr-interest/attachments/20090601/d711e3bd/attachment.obj 


More information about the antlr-interest mailing list