Date: Fri, 12 Mar 1999 12:24:39 +0200 (EET) From: Ruslan Ermilov <ru@ucb.crimea.ua> To: FreeBSD-gnats-submit@freebsd.org Subject: gnu/10555: [PATCH] awk dumps core Message-ID: <199903121024.MAA12297@relay.ucb.crimea.ua>
next in thread | raw e-mail | index | archive | help
>Number: 10555
>Category: gnu
>Synopsis: [PATCH] awk dumps core
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: change-request
>Submitter-Id: current-users
>Arrival-Date: Fri Mar 12 02:30:01 PST 1999
>Closed-Date:
>Last-Modified:
>Originator: Ruslan Ermilov
>Release: FreeBSD 3.1-STABLE i386
>Organization:
United Commercial Bank
>Environment:
3.1-STABLE
GNU Awk 3.0.3
>Description:
awk dumps core (signal 11)
>How-To-Repeat:
# awk '{ print $1,,$2 }'
awk: cmd. line:1: { print $1,,$2 }
awk: cmd. line:1: ^ parse error
awk: cmd. line:1: fatal error: internal error
Abort trap - core dumped
GDB is free software and you are welcome to 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.
GDB 4.16 (i386-unknown-freebsd),
Copyright 1996 Free Software Foundation, Inc...
Core was generated by `awk'.
Program terminated with signal 6, Abort trap.
Reading symbols from /usr/lib/libgnuregex.so.2...done.
Reading symbols from /usr/lib/libm.so.2...done.
Reading symbols from /usr/lib/libc.so.3...done.
Reading symbols from /usr/libexec/ld-elf.so.1...done.
#0 0x280d1c44 in _kill ()
(gdb) bt
#0 0x280d1c44 in _kill ()
#1 0x28105cf4 in abort ()
#2 0x8058432 in catchsig (sig=11, code=12)
at /usr/src/gnu/usr.bin/awk/../../../contrib/awk/main.c:708
#3 <signal handler called>
#4 0x804d934 in append_right (list=0x0, new=0x806c990) at awktab.y:2114
#5 0x804ae98 in yyparse () at awktab.y:630
#6 0x8057cad in main (argc=2, argv=0xefbfdbe4)
at /usr/src/gnu/usr.bin/awk/../../../contrib/awk/main.c:373
#7 0x8049635 in _start ()
>Fix:
The following patch is for src/contrib/awk/awk.y:
Index: awk.y
===================================================================
RCS file: /usr/FreeBSD-CVS/src/contrib/awk/awk.y,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 awk.y
--- awk.y 1997/10/14 18:16:58 1.1.1.1
+++ awk.y 1999/03/12 10:06:47
@@ -2111,7 +2111,9 @@
oldlist = list;
if (savefront == oldlist) {
- savetail = savetail->rnode = new;
+ savetail = new;
+ if (savetail)
+ savetail->rnode = new;
return oldlist;
} else
savefront = oldlist;
>Release-Note:
>Audit-Trail:
>Unformatted:
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-bugs" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199903121024.MAA12297>
