Module Name:    src
Committed By:   kre
Date:           Thu Aug 31 05:09:38 UTC 2017

Modified Files:
        src/bin/sh: var.c

Log Message:
Fix a bug noticed by Soren Jacobsen running the netbsd-6-0 build.sh which
causes a core dump in some exotic circumstances (when restoring local
variables when a function returns).  ("build.sh makewrapper" exposed it.)

This was introduced in 1.63 - not as part of the substance of that
change (addition) but as an unrelated "must be the right thing to do"
cleanup, which wasn't...


To generate a diff of this commit:
cvs rdiff -u -r1.66 -r1.67 src/bin/sh/var.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/bin/sh/var.c
diff -u src/bin/sh/var.c:1.66 src/bin/sh/var.c:1.67
--- src/bin/sh/var.c:1.66	Mon Jul 24 13:36:15 2017
+++ src/bin/sh/var.c	Thu Aug 31 05:09:38 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: var.c,v 1.66 2017/07/24 13:36:15 kre Exp $	*/
+/*	$NetBSD: var.c,v 1.67 2017/08/31 05:09:38 kre Exp $	*/
 
 /*-
  * Copyright (c) 1991, 1993
@@ -37,7 +37,7 @@
 #if 0
 static char sccsid[] = "@(#)var.c	8.3 (Berkeley) 5/4/95";
 #else
-__RCSID("$NetBSD: var.c,v 1.66 2017/07/24 13:36:15 kre Exp $");
+__RCSID("$NetBSD: var.c,v 1.67 2017/08/31 05:09:38 kre Exp $");
 #endif
 #endif /* not lint */
 
@@ -476,7 +476,7 @@ setvareq(char *s, int flags)
 		return;
 	}
 	vp = ckmalloc(sizeof (*vp));
-	vp->flags = flags & ~(VNOFUNC|VFUNCREF|VSTRFIXED);
+	vp->flags = flags & ~(VNOFUNC|VFUNCREF);
 	vp->text = s;
 	vp->name_len = nlen;
 	vp->next = *vpp;

Reply via email to