From mboxrd@z Thu Jan 1 00:00:00 1970 From: Emmanuel Jeandel Subject: Re: segfault with backtrace and information Date: Sat, 14 Dec 2002 14:23:22 +0100 Sender: linux-msdos-owner@vger.kernel.org Message-ID: <20021214132322.GA32460@ens-lyon.fr> References: <20021208203022.GA5036@dirac.org> Reply-To: E_Jeandel@mail.dotcom.fr Mime-Version: 1.0 Return-path: Content-Disposition: inline In-Reply-To: <20021208203022.GA5036@dirac.org> List-Id: Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: linux-msdos@vger.kernel.org Peter Jay Salzman said : > dosemu consistantly segfaults on one of my machines. > > > the area of code: > > (gdb) l 707 > 702 {STRQUOTELESS} MAY_BEFORME { > 703 yylval->s_value = strdup(yytext); > 704 EXPRTYPE(yylval->s_value) = TYPE_STRQUOTELESS; > 705 return(STRING); } > [snip] Hi, I encounter the same bug using gcc 3.2.2, bison 1.75 and flex 2.5.4 I found that parser.c calls yylex without arguments, whereas lex.yy.c defines yylex to be of type yylex(YYTYPE *yylval). That means that bison does not build a pure parser, although YYPURE was defined. I do not know exactly whether it is gcc or bison that is behaving wrong, but inserting the line : %pure-parser in the file parser.y.in (after the line: %start lines, for example) was sufficient for me to solve this problem. Regards, Emmanuel