NetBSD-Bugs archive

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

misc/56453: config(1): Assertion fails in config -L



>Number:         56453
>Category:       misc
>Synopsis:       config(1): Assertion fails in config -L
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    misc-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Oct 12 13:45:00 +0000 2021
>Originator:     Wataru Ashihara
>Release:        -current (2021-09-18 03:05:20 +0000)
>Organization:
>Environment:
NetBSD localhost 9.99.88 NetBSD 9.99.88 (GENERIC) #9: Sun Sep 19 15:42:53 JST 2021  wsh@wsh64:/home/wsh/qc/netbsd/zco.amd64/sys/arch/amd64/compile/GENERIC amd64
>Description:
    $ cd sys/arch/amd64/conf/
    $ config -L GENERIC
    include "/disk1/home/wsh/netbsd/sys/arch/amd64/conf/GENERIC"
    ...
    options WSCONS_SUPPORT_PCVTFONTS

    assertion "dl2 == dl" failed: file "/usr/src/usr.bin/config/lint.c", line 87, function "do_emit_option"
    options WSEMUL_DEFAULTfish: 'config -L GENERIC' terminated by signal SIGABRT (Abort)

>How-To-Repeat:

>Fix:
diff --git a/usr.bin/config/lint.c b/usr.bin/config/lint.c
index 0066acd8b11..1608b3c4bb2 100644
--- a/usr.bin/config/lint.c
+++ b/usr.bin/config/lint.c
@@ -80,11 +80,11 @@ do_emit_option(const char *name, struct defoptlist *dl, void *v)
 	printf("%s\t%s", ot->ot_name, dl->dl_name);
 	if (ot->ot_type == OT_PARAM) {
 		struct defoptlist *dl2 = dlhash_lookup(defoptlint, dl->dl_name);
-		if (dl2 != NULL)
+		if (dl2 != NULL) {
+			assert(dl2 == dl);
 			value = dl2->dl_lintvalue;
-		else
+		} else
 			value = dl->dl_value;
-		assert(dl2 == dl);
 		printf("=\"%s\"", value ? value : "1");
 	}
 	printf("\n");



Home | Main Index | Thread Index | Old Index