[antlr-interest] SEGV when running AST builder in C target, antlr3.0

Jim Idle jimi at temporal-wave.com
Fri Jul 13 12:11:19 PDT 2007


I checked this and the bug was indeed fixed by an earlier bug fix. All
it was, was that initialization of the tree roots had been inadvertently
turned off.

There will be an update release before too long (once Ter decides it is
ready) which will have this and other fixes, as well as many minor
improvements and conveniences.

Jim

> -----Original Message-----
> From: antlr-interest-bounces at antlr.org [mailto:antlr-interest-
> bounces at antlr.org] On Behalf Of Hardy, Stephen
> Sent: Tuesday, July 03, 2007 4:11 PM
> To: antlr-interest at antlr.org
> Subject: [antlr-interest] SEGV when running AST builder in C target,
> antlr3.0
> 
> Jim,
> 
> when adding output=AST stuff to the C grammar, the runtime library
gets
> a seg fault in becomeRoot().  The main problem seems to be that the
> code
> tests pointers for NULL, whereas the pointers are actually getting
> small
> negative numbers because of various consitions in the token stream
> (such
> as empty).  Probably, there needs to be a macro like
> IS_NOT_A_POINTER_OR_IS_NULL(newRootTree) etc.
> 
> Regards,
> SJH


More information about the antlr-interest mailing list