Module Name: src Committed By: rillig Date: Fri Jul 31 20:57:39 UTC 2020
Modified Files: src/usr.bin/make: dir.c Log Message: 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. To generate a diff of this commit: cvs rdiff -u -r1.81 -r1.82 src/usr.bin/make/dir.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/usr.bin/make/dir.c diff -u src/usr.bin/make/dir.c:1.81 src/usr.bin/make/dir.c:1.82 --- src/usr.bin/make/dir.c:1.81 Fri Jul 31 20:02:44 2020 +++ src/usr.bin/make/dir.c Fri Jul 31 20:57:38 2020 @@ -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 @@ DirPrintWord(void *word, void *dummy MAK * * Side Effects: * Directories may be opened. Who knows? + * Undefined behavior if the word is really in read-only memory. *----------------------------------------------------------------------- */ void