bug-bison
[Top][All Lists]
Advanced

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

Re: Bison 1.875 coredump


From: Paul Govereau
Subject: Re: Bison 1.875 coredump
Date: Wed, 2 Apr 2003 12:55:09 -0500
User-agent: Mutt/1.4i

Thanks for your quick reply. I have tried version 1.875a with the same
results. I have done a little bit of investigation, and it seems like
the problem is parse-gram.y calling into reader.c with an invalid
pointer (loc.start.file). I have attached a stack trace below. Also, I
noticed that if I run bison with "--trace=scan" or "--trace=parse" it
does not crash, and seems to work fine. Once again, my inputs are:

%% A : B %%      --> core dump
%% A : B; %%     --> works fine
%% A : B         --> works fine

Thanks,
Paul Govereau

--- stack trace of core dump ---

pgoverea:/opt/bison-1.875a/dist>gdb ./bin/bison core 
GNU gdb 4.18
Copyright 1998 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "i386-redhat-linux"...
Core was generated by `./bin/bison parse.y'.
Program terminated with signal 11, Segmentation fault.
Reading symbols from /lib/libc.so.6...done.
Reading symbols from /lib/ld-linux.so.2...done.
#0  0x806168f in quotearg_buffer_restyled (buffer=0x8073a40 "\"", 
    buffersize=256, arg=0x3 <Address 0x3 out of bounds>, argsize=4294967295, 
    quoting_style=c_quoting_style, o=0xbfffc37c) at quotearg.c:256
256       for (i = 0;  ! (argsize == SIZE_MAX ? arg[i] == '\0' : i == argsize); 
 i++)
(gdb) bt
#0  0x806168f in quotearg_buffer_restyled (buffer=0x8073a40 "\"", 
    buffersize=256, arg=0x3 <Address 0x3 out of bounds>, argsize=4294967295, 
    quoting_style=c_quoting_style, o=0xbfffc37c) at quotearg.c:256
#1  0x8061b47 in quotearg_buffer (buffer=0x8073a40 "\"", buffersize=256, 
    arg=0x3 <Address 0x3 out of bounds>, argsize=4294967295, o=0xbfffc37c)
    at quotearg.c:503
#2  0x8061c15 in quotearg_n_options (n=0, arg=0x3 <Address 0x3 out of bounds>, 
    argsize=4294967295, options=0xbfffc37c) at quotearg.c:560
#3  0x8061cfd in quotearg_n_style (n=0, s=c_quoting_style, 
    arg=0x3 <Address 0x3 out of bounds>) at quotearg.c:600
#4  0x8061d48 in quotearg_style (s=c_quoting_style, 
    arg=0x3 <Address 0x3 out of bounds>) at quotearg.c:614
#5  0x80565d8 in epilogue_augment (epilogue=0x807a7d4 "\n", loc={start = {
        file = 0x3 <Address 0x3 out of bounds>, line = 9, column = 134693576}, 
      end = {file = 0x80742c8 "parse.y", line = 5, column = 1}}) at reader.c:93
#6  0x8053fc0 in gram_parse () at parse-gram.y:399
#7  0x805702f in reader () at reader.c:501
#8  0x804d2ea in main (argc=2, argv=0xbffffce4) at main.c:80
(gdb) 

On Apr 01, Paul Eggert wrote:
> Paul Govereau <address@hidden> writes:
> 
> > Bison 1.875 will crash if the last rule does not have a semicolon
> > after it.
> 
> Thanks for your bug report.  I can't reproduce the bug in Bison test
> version 1.875a, which you can get from:
> 
> <ftp://alpha.gnu.org/gnu/bison/bison-1.875a.tar.gz>
> 
> Can you please try that version?  It could be that the bug is
> platform-specific.  Thanks.




reply via email to

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