[antlr-interest] C parser - tree generation - memory problem
Heinrich du Toit
heinrich at silasvalley.com
Thu Sep 25 12:01:32 PDT 2008
Thanks for the information!
Can you please just clarify what you mean with "perforce" ?
Only place I can find that have c API downloads is
:http://www.antlr.org/download/C/
and only 3.1 is there... obviously.
So where exactly do I download this?
thanks
Jim Idle wrote:
> Plear update to latest 3.1.1 dist as this is fixed. You will need to get this from perforce for a few days.
>
> It was just debugging code duplicating bodes.
>
> Jim
> Sent via BlackBerry from T-Mobile
>
> -----Original Message-----
> From: Heinrich du Toit <heinrich at silasvalley.com>
>
> Date: Thu, 25 Sep 2008 12:27:17
> To: <antlr-interest at antlr.org>
> Subject: [antlr-interest] C parser - tree generation - memory problem
>
>
> Hi
>
> MY code kept on giving segfaults..
> So I traced it..
>
> in antlr3commontree.c:
> function newPool: ( around line 99)
>
> basicly the ANTLR3_CALLOC there to create a new pool fails after a while..
> Runs out of memory :(
> But If you print out factory->thisPool then it runs very high.. high
> enough to flood a GB or 2..
>
>
>
> anyways this causes segfault in newPoolTree.
>
> segfault happens usually on this line:
> tree->baseTree.super = tree;
>
>
> Not sure how to fix but I'm suprised the thing runs out of memory :(
> I'm guessing it has todo with the way backtrace or memoize is implemented?
>
> Attached is the .g grammer file..
> And also the testme.txt file on which this things segfaults itself.
>
> btw. using cygwin
>
>
> thanks for any help..
> -H
>
>
>
More information about the antlr-interest
mailing list