help-bison
[Top][All Lists]
Advanced

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

Re: bison and malloc


From: Bob Rossi
Subject: Re: bison and malloc
Date: Wed, 11 Oct 2006 08:58:59 -0400
User-agent: Mutt/1.5.11

On Wed, Oct 11, 2006 at 08:38:32PM +0800, s88 wrote:
> Hi all:
>   I'm confused with the bison and malloc right now...
> I'm using the Bison 2.0 on Ubuntu(Linux) 6.06, and everytime when I use
> the malloc(actually is strdup) in the production rules. It will cause an
> unpredictable
> segmentation fault. The stack size on my system is set unlimited.
> Every time after using the dynamic allocate memory, I'll free the memory by
> myself.
> 
> What cause this fault, and how to fix it?
> 
> Any idea?

Try using valgrind and/or GDB on the generated parser. This should
point you to the problem.

Bob Rossi




reply via email to

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