Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/usr.bin/make make(1): document another instance of undefined...



details:   https://anonhg.NetBSD.org/src/rev/f058aeba12a4
branches:  trunk
changeset: 974435:f058aeba12a4
user:      rillig <rillig%NetBSD.org@localhost>
date:      Fri Jul 31 20:57:38 2020 +0000

description:
make(1): document another instance of undefined behavior

The UNCONST macro is really terrible.

This segmentation fault can be forced by setting _PATH_DEFSYSMK in
pathnames.h to "./sys*.mk" or any other string that has a slash and a
wildcard to the right of the slash.

diffstat:

 usr.bin/make/dir.c |  7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diffs (34 lines):

diff -r 280ba314999e -r f058aeba12a4 usr.bin/make/dir.c
--- a/usr.bin/make/dir.c        Fri Jul 31 20:46:53 2020 +0000
+++ b/usr.bin/make/dir.c        Fri Jul 31 20:57:38 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: dir.c,v 1.81 2020/07/31 20:02:44 rillig Exp $  */
+/*     $NetBSD: dir.c,v 1.82 2020/07/31 20:57:38 rillig Exp $  */
 
 /*
  * Copyright (c) 1988, 1989, 1990 The Regents of the University of California.
@@ -70,14 +70,14 @@
  */
 
 #ifndef MAKE_NATIVE
-static char rcsid[] = "$NetBSD: dir.c,v 1.81 2020/07/31 20:02:44 rillig Exp $";
+static char rcsid[] = "$NetBSD: dir.c,v 1.82 2020/07/31 20:57:38 rillig Exp $";
 #else
 #include <sys/cdefs.h>
 #ifndef lint
 #if 0
 static char sccsid[] = "@(#)dir.c      8.2 (Berkeley) 1/2/94";
 #else
-__RCSID("$NetBSD: dir.c,v 1.81 2020/07/31 20:02:44 rillig Exp $");
+__RCSID("$NetBSD: dir.c,v 1.82 2020/07/31 20:57:38 rillig Exp $");
 #endif
 #endif /* not lint */
 #endif
@@ -852,6 +852,7 @@
  *
  * Side Effects:
  *     Directories may be opened. Who knows?
+ *     Undefined behavior if the word is really in read-only memory.
  *-----------------------------------------------------------------------
  */
 void



Home | Main Index | Thread Index | Old Index