Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 44292 - sys-devel/bison-1.875 segfaults on empty input file
Summary: sys-devel/bison-1.875 segfaults on empty input file
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: High enhancement (vote)
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-03-10 14:51 UTC by thither
Modified: 2005-01-10 15:26 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description thither 2004-03-10 14:51:19 UTC
I get a segmentation error when I try to run bison on an empty input file.

% touch foo.y
% bison foo.y
zsh: segmentation fault  bison diff.y
% bison --version
bison (GNU Bison) 1.875
Written by Robert Corbett and Richard Stallman.

Copyright (C) 2002 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
%

Note that bison does seem to work fairly well in other respects - with well-formed files it produces seemingly correct output, error messages, etc.

-----
emerge --info:

Portage 2.0.50-r1 (default-amd64-2004.0, gcc-3.3.3, glibc-2.3.3_pre20040207-r0, 2.6.3-gentoo-r2)
=================================================================
System uname: 2.6.3-gentoo-r2 x86_64 4
Gentoo Base System version 1.4.3.13p1
Autoconf: sys-devel/autoconf-2.59-r3
Automake: sys-devel/automake-1.8.2
ACCEPT_KEYWORDS="amd64 ~amd64"
AUTOCLEAN="yes"
CFLAGS="-O2"
CHOST="x86_64-pc-linux-gnu"
COMPILER="gcc3"
CONFIG_PROTECT="/etc /usr/X11R6/lib/X11/xkb /usr/kde/2/share/config /usr/kde/3.2/share/config /usr/kde/3/share/config /usr/lib/mozilla/defaults/pref /usr/share/config /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-O2"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoaddcvs ccache sandbox"
GENTOO_MIRRORS="http://gentoo.binarycompass.org http://gentoo.ccccom.com http://gentoo.llarian.net/ ftp://gentoo.ccccom.com"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY=""
SYNC="rsync://rsync.namerica.gentoo.org/gentoo-portage"
USE="X alsa amd amd64 apache2 apm arts avi berkdb crypt curl dvd emacs emacs-w3 encode esd foomaticdb gdbm gif gnome gpm gtk gtk2 guile imlib jpeg kde libg++ libwww log4j mikmod motif mozilla moznocompose moznoirc mpeg multilib mysql ncurses nls oggvorbis opengl oss pam parse-clocks pcap pcmcia pdflib perl png postgres python qt quicktime radeon readline sdl slang speedo speex spell ssl tcltk tcpd threads truetype wxwindows xalan xerces xml2 xmms xv zlib"
Comment 1 thither 2004-03-10 15:00:40 UTC
Just a note - possibly this is related to bug 42445.  I tried to manually unmask that package and build aide, but it didn't get any farther than configure due to some king of postgresql library error.
Comment 2 Danny van Dyk (RETIRED) gentoo-dev 2004-03-20 14:17:27 UTC
I tried to redo your steps, but i don't get any segfault:
phi dvandyk $ touch empty
phi dvandyk $ bison empty
:5463904.0-
Comment 3 Danny van Dyk (RETIRED) gentoo-dev 2004-03-20 14:17:27 UTC
I tried to redo your steps, but i don't get any segfault:
phi dvandyk $ touch empty
phi dvandyk $ bison empty
:5463904.0-òöÿ¿\177:2.-1: syntax error, unexpected "end of file"
phi root # bison --version
bison (GNU Bison) 1.875
Written by Robert Corbett and Richard Stallman.

Copyright (C) 2002 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
phi dvandyk $

I don't know bison at all, it that output expected for the issued command ?
Comment 4 Jason Huebel (RETIRED) gentoo-dev 2004-03-21 09:22:15 UTC
segfaults for me too...

Portage 2.0.50-r1 (default-amd64-2004.0, gcc-3.3.3, glibc-2.3.3_pre20040207-r0, 2.6.3-gentoo-r2)
=================================================================
System uname: 2.6.3-gentoo-r2 x86_64 4
Gentoo Base System version 1.4.3.13p1
Autoconf: sys-devel/autoconf-2.59-r3
Automake: sys-devel/automake-1.8.2
ACCEPT_KEYWORDS="amd64 ~amd64"
AUTOCLEAN="yes"
CFLAGS="-O2"
CHOST="x86_64-pc-linux-gnu"
COMPILER="gcc3"
CONFIG_PROTECT="/etc /usr/X11R6/lib/X11/xkb /usr/kde/2/share/config /usr/kde/3.2/share/config /usr/kde/3/share/config /usr/lib/mozilla/defaults/pref /usr/share/config /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-O2"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoaddcvs ccache cvs sandbox"
GENTOO_MIRRORS="http://gentoo.oregonstate.edu ftp://distro.ibiblio.org/pub/Linux/distributions/gentoo"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/home/jhuebel/prog/gentoo-x86"
PORTDIR_OVERLAY=""
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="X alsa amd64 apm arts avi berkdb crypt cups directfb doc dvdr encode foomaticdb gdbm gif gpm imlib java jpeg kde libg++ libwww mad mikmod motif mozilla moznocompose moznoirc mozsvg mpeg multilib mysql ncurses nls noreiserfs oggvorbis opengl oss pam pdflib perl png ppds python qt quicktime readline samba scanner sdl slang spell sqlite ssl tcpd tiff truetype usb xml2 xmms xv zlib"
Comment 5 Jon Portnoy (RETIRED) gentoo-dev 2004-03-21 11:11:32 UTC
I can reproduce this on my x86 machines. Doesn't look like it's strictly an AMD64 issue.

(Is there any legitimate reason bison would be running on empty files?)
Comment 6 SpanKY gentoo-dev 2005-01-10 15:26:00 UTC
bison-1.875d seems to have this fixed:

root@vapier 0 ~ # bison --version | head -n 1
bison (GNU Bison) 1.875d
root@vapier 0 ~ # touch foo.y
root@vapier 0 ~ # bison foo.y
foo.y:1.1: syntax error, unexpected "end of file"