NetBSD Problem Report #7393

Received: (qmail 26328 invoked from network); 15 Apr 1999 02:38:13 -0000
Message-Id: <199904150238.TAA27724@nooksack.ldc.cs.wwu.edu>
Date: Wed, 14 Apr 1999 19:38:12 -0700 (PDT)
From: svs@ropnet.ru
To: gnats-bugs@gnats.netbsd.org
Subject: In-tree gawk dies with a SIGFPE when fed large amounts of data.
X-Send-Pr-Version: www-1.0

>Number:         7393
>Category:       bin
>Synopsis:       In-tree gawk dies with a SIGFPE when fed large amounts of data.
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    erh
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Apr 14 19:50:01 +0000 1999
>Closed-Date:    Mon Apr 08 00:48:52 +0000 2002
>Last-Modified:  Mon Apr 08 00:48:52 +0000 2002
>Originator:     Sergey Svishchev
>Release:        1.3.2
>Organization:
>Environment:
>Description:
A gawk script, which has to hold big amounts of data in memory, runs into a bug
in function grow_table().

>How-To-Repeat:
Write a script to convert data from home-grown format to one used by
General Mesh Viewer.  Feed it real-world data.  Watch gawk die with a
SIGFPE in hash() because grow_table() returned zero newsize (because
oldsize was 65497.)

>Fix:
--- /usr/src/gnu/usr.bin/gawk/array.c	Tue May  5 10:32:51 1998
+++ array.c	Wed Apr 14 19:37:03 1999
@@ -471,7 +471,7 @@
 		}
 	}

-	if (newsize == oldsize) {	/* table already at max (!) */
+	if (newsize == oldsize || newsize == 0) {/* table already at max (!) */
 		symbol->flags |= ARRAYMAXED;
 		return;
 	}

>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->feedback 
State-Changed-By: erh 
State-Changed-When: Sat Mar 30 11:08:35 PST 2002 
State-Changed-Why:  
This is apparently fixed in the version of gawk that is in the tree. 
The maximum size of the table is now around 100M.  Also, the way the newsize 
is figured out now looks like it should never get set to 0.  I'm going to  
close this in a couple days unless you object to it. 


Responsible-Changed-From-To: bin-bug-people->erh 
Responsible-Changed-By: erh 
Responsible-Changed-When: Sat Mar 30 11:08:35 PST 2002 
Responsible-Changed-Why:  
. 
State-Changed-From-To: feedback->closed 
State-Changed-By: erh 
State-Changed-When: Sun Apr 7 17:47:54 PDT 2002 
State-Changed-Why:  
Assuming lack of response means problem no longer occurs. 
>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.51 2026/08/10 02:28:17 riastradh Exp $
$NetBSD: gnats_config.sh,v 1.10 2026/05/13 22:00:09 riastradh Exp $
Copyright © 1994-2026 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.