From owner-freebsd-bugs@FreeBSD.ORG Thu Nov 5 12:50:03 2009 Return-Path: Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AE42B10656A3 for ; Thu, 5 Nov 2009 12:50:03 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 729E98FC1F for ; Thu, 5 Nov 2009 12:50:03 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.3/8.14.3) with ESMTP id nA5Co2DL075220 for ; Thu, 5 Nov 2009 12:50:02 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.3/8.14.3/Submit) id nA5Co2AQ075219; Thu, 5 Nov 2009 12:50:02 GMT (envelope-from gnats) Resent-Date: Thu, 5 Nov 2009 12:50:02 GMT Resent-Message-Id: <200911051250.nA5Co2AQ075219@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Philippe Pepiot Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F3D2610656BE for ; Thu, 5 Nov 2009 12:46:35 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (www.freebsd.org [IPv6:2001:4f8:fff6::21]) by mx1.freebsd.org (Postfix) with ESMTP id 5F9248FC20 for ; Thu, 5 Nov 2009 12:46:35 +0000 (UTC) Received: from www.freebsd.org (localhost [127.0.0.1]) by www.freebsd.org (8.14.3/8.14.3) with ESMTP id nA5CkYg7093814 for ; Thu, 5 Nov 2009 12:46:34 GMT (envelope-from nobody@www.freebsd.org) Received: (from nobody@localhost) by www.freebsd.org (8.14.3/8.14.3/Submit) id nA5CkYtl093813; Thu, 5 Nov 2009 12:46:34 GMT (envelope-from nobody) Message-Id: <200911051246.nA5CkYtl093813@www.freebsd.org> Date: Thu, 5 Nov 2009 12:46:34 GMT From: Philippe Pepiot To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.1 Cc: Subject: bin/140309: bad syntax cause yacc segfault X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Nov 2009 12:50:03 -0000 >Number: 140309 >Category: bin >Synopsis: bad syntax cause yacc segfault >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Thu Nov 05 12:50:02 UTC 2009 >Closed-Date: >Last-Modified: >Originator: Philippe Pepiot >Release: 9.0 CURRENT >Organization: >Environment: FreeBSD shen.philpep.org 9.0-CURRENT FreeBSD 9.0-CURRENT #0: Wed Nov 4 19:56:02 CET 2009 root@shen.philpep.org:/usr/src/sys/i386/compile/SHEN i386 >Description: Sometimes yacc segfault when declare typed rule and you don't set a value to $$ in the grammar rule. The expected behavior of yacc in this case is to print an error message like "the value of typed rule hasn't been set". Here's backtrace : #0 0x08053811 in end_rule () at /usr/src/usr.bin/yacc/reader.c:1260 1260 if (pitem[i+1] == 0 || pitem[i+1]->tag != plhs[nrules]->tag) #0 0x08053811 in end_rule () at /usr/src/usr.bin/yacc/reader.c:1260 #1 0x0805486d in read_grammar () at /usr/src/usr.bin/yacc/reader.c:1632 #2 0x08055591 in reader () at /usr/src/usr.bin/yacc/reader.c:1926 #3 0x0804c4b4 in main (argc=2, argv=0xbfbfeb48) at /usr/src/usr.bin/yacc/main.c:434 >How-To-Repeat: Just yacc this file : %type rule %% rule: ; %% $ yacc file.y segmentation fault (core dumped) /usr/bin/yacc >Fix: >Release-Note: >Audit-Trail: >Unformatted: