Module Name: src Committed By: mrg Date: Mon Aug 14 05:29:28 UTC 2023
Modified Files: src/external/bsd/tre/lib: Makefile Log Message: apply -Wno-error for GCC 12. this code seems broken. hash_table_del() is called on a ptr that was either just freed (realloc() case) or will be freed (xfree_impl() case), but in both cases hash_table_del() will free() the same address. for the realloc() case, as it's after free(), it's UB. for the xfree_impl() case, it can be solved by not free()ing here. To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/external/bsd/tre/lib/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/external/bsd/tre/lib/Makefile diff -u src/external/bsd/tre/lib/Makefile:1.5 src/external/bsd/tre/lib/Makefile:1.6 --- src/external/bsd/tre/lib/Makefile:1.5 Thu Aug 3 14:56:36 2023 +++ src/external/bsd/tre/lib/Makefile Mon Aug 14 05:29:28 2023 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.5 2023/08/03 14:56:36 rin Exp $ +# $NetBSD: Makefile,v 1.6 2023/08/14 05:29:28 mrg Exp $ # for information: # the configure script is run as: @@ -19,4 +19,8 @@ SRCS+= tre-ast.c tre-compile.c tre-match SRCS+= tre-match-backtrack.c tre-match-parallel.c tre-mem.c SRCS+= tre-parse.c tre-stack.c xmalloc.c +# XXXGCC12 this is very broken. it double-free()'s as well as the UB +# after realloc(). +COPTS.xmalloc.c+= -Wno-error + .include <bsd.lib.mk>