Module Name: src
Committed By: rillig
Date: Sun Sep 29 13:16:57 UTC 2024
Modified Files:
src/usr.bin/xlint/lint1: err.c
Log Message:
lint: only skip assertion failure in fuzzing mode
Skipping the assertion message after seeing a syntax error in the parser
was surprising, as there was no information about the assertion that
failed.
To generate a diff of this commit:
cvs rdiff -u -r1.248 -r1.249 src/usr.bin/xlint/lint1/err.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/xlint/lint1/err.c
diff -u src/usr.bin/xlint/lint1/err.c:1.248 src/usr.bin/xlint/lint1/err.c:1.249
--- src/usr.bin/xlint/lint1/err.c:1.248 Sat Sep 28 19:09:37 2024
+++ src/usr.bin/xlint/lint1/err.c Sun Sep 29 13:16:57 2024
@@ -1,4 +1,4 @@
-/* $NetBSD: err.c,v 1.248 2024/09/28 19:09:37 rillig Exp $ */
+/* $NetBSD: err.c,v 1.249 2024/09/29 13:16:57 rillig Exp $ */
/*
* Copyright (c) 1994, 1995 Jochen Pohl
@@ -37,7 +37,7 @@
#include <sys/cdefs.h>
#if defined(__RCSID)
-__RCSID("$NetBSD: err.c,v 1.248 2024/09/28 19:09:37 rillig Exp $");
+__RCSID("$NetBSD: err.c,v 1.249 2024/09/29 13:16:57 rillig Exp $");
#endif
#include <limits.h>
@@ -612,6 +612,7 @@ void
assert_failed(const char *file, int line, const char *func, const char *cond)
{
+#if LINT_FUZZING
/*
* After encountering a parse error in the grammar, lint often does not
* properly clean up its data structures, especially in 'dcs', the
@@ -624,6 +625,7 @@ assert_failed(const char *file, int line
*/
if (sytxerr > 0)
norecover();
+#endif
(void)fflush(stdout);
(void)fprintf(stderr,