Module Name: src
Committed By: mrg
Date: Tue Sep 5 00:12:14 UTC 2023
Modified Files:
src/lib/libpuffs: Makefile
Log Message:
apply -Wno-dangling-pointer to callcontext.c.
puffs_cc_getcc() uses a mask against a stack variable to find the
struct puffs_cc stashed below the stack, triggering the dangling
pointer problem.
To generate a diff of this commit:
cvs rdiff -u -r1.29 -r1.30 src/lib/libpuffs/Makefile
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/lib/libpuffs/Makefile
diff -u src/lib/libpuffs/Makefile:1.29 src/lib/libpuffs/Makefile:1.30
--- src/lib/libpuffs/Makefile:1.29 Fri Mar 31 04:51:32 2023
+++ src/lib/libpuffs/Makefile Tue Sep 5 00:12:14 2023
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.29 2023/03/31 04:51:32 rillig Exp $
+# $NetBSD: Makefile,v 1.30 2023/09/05 00:12:14 mrg Exp $
#
.include <bsd.own.mk>
@@ -20,4 +20,8 @@ LINTFLAGS+=-S -w
LINTFLAGS+= -X 351 # extern declaration outside header
LINTFLAGS+= -X 352 # nested extern declaration
+# XXXGCC12 - accesses struct puffs_cc* via stack pointers, returns the
+# address to caller
+COPTS.callcontext.c+= ${${ACTIVE_CC} == "gcc" && ${HAVE_GCC:U0} >= 12:? -Wno-dangling-pointer :}
+
.include <bsd.lib.mk>