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?
> 
> Thankx!!!!!
> Dave.

The most likely cause would be that you're free()ing twice.
But without a little bit of code to illustrate what you're doing, it's
very hard to diagnose a crash bug.




_______________________________________________
help-bison@gnu.org http://lists.gnu.org/mailman/listinfo/help-bison

Reply via email to