bug-bison
[Top][All Lists]
Advanced

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

Re: %destructor and stack overflow


From: Marcus Holland-Moritz
Subject: Re: %destructor and stack overflow
Date: Sat, 30 Apr 2005 20:09:38 +0200

on 2005-04-28, at 22:46:21 -0700, Paul Eggert wrote:

> Marcus Holland-Moritz <address@hidden> writes:
> 
> > When the parser detects a stack overflow, it should call
> > the cleanup actions defined via %destructor for all symbols
> > on the stack (and the symbol causing the overflow) before
> > it returns.
> 
> Yes, that sounds right.  Can you write and test a patch to data/yacc.c
> that does that?  Presumably it would be some code executed just after
> the "parser stack overflow" message, that would call yydestruct.

What about the attached patch against the CVS version of bison?

All tests still pass, and I've added a test to tests/actions.at that
forces a stack overflow and checks that all symbols are freed.

If especially the test part looks kludgy, it's probably because I've
never used m4/autotest before...

Marcus

Attachment: bison-destructor-overflow.patch
Description: Text Data


reply via email to

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