NetBSD Problem Report #55002

From www@netbsd.org  Sat Feb 22 09:24:35 2020
Return-Path: <www@netbsd.org>
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(Client CN "mail.NetBSD.org", Issuer "mail.NetBSD.org CA" (not verified))
	by mollari.NetBSD.org (Postfix) with ESMTPS id 151701A9217
	for <gnats-bugs@gnats.NetBSD.org>; Sat, 22 Feb 2020 09:24:35 +0000 (UTC)
Message-Id: <20200222092434.118651A9218@mollari.NetBSD.org>
Date: Sat, 22 Feb 2020 09:24:34 +0000 (UTC)
From: bobs@thelibertytree.org
Reply-To: bobs@thelibertytree.org
To: gnats-bugs@NetBSD.org
Subject: Broken kernel option, found the problem
X-Send-Pr-Version: www-1.0

>Number:         55002
>Category:       port-prep
>Synopsis:       Broken kernel option, found the problem
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    port-prep-maintainer
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sat Feb 22 09:25:00 +0000 2020
>Originator:     Tim
>Release:        8.1_STABLE
>Organization:
>Environment:
I cross-compile so build machine is:
NetBSD 8.1_STABLE (GENERIC) #0: Fri Jan 24 18:50:19 UTC 2020  mkrepro@mkrepro.NetBSD.org:/usr/src/sys/arch/amd64/compile/GENERIC amd64

Target machine is:
NetBSD 8.1_STABLE (7248-132.v6) #11: Sat Feb 22 00:36:53 MST 2020  XXXX@XXXX:/usr/obj/prep/netbsd-8/objdir/sys/arch/prep/compile/GENERIC prep
>Description:
Enabling the option "RESIDUAL_DATA_DUMP" in the prep kernel config will cause this error when compiled:

--- residual.o ---
/usr/src/sys/arch/prep/prep/residual.c: In function 'large_vendor_pcibridge_subr':
/usr/src/sys/arch/prep/prep/residual.c:944:26: error: 't' undeclared (first use in this function)
   for (j = 0, first = 1, t = tmpstr; j < MAX_PCI_INTRS; j++) {
                          ^
/usr/src/sys/arch/prep/prep/residual.c:944:26: note: each undeclared identifier is reported only once for each function it appears in
*** [residual.o] Error code 1

nbmake: stopped in /usr/obj/prep/netbsd-8/objdir/sys/arch/prep/compile/GENERIC
--- /usr/obj/prep/netbsd-8/objdir/sys/arch/prep/compile/GENERIC/lib/compat/libcompat.a ---
A failure has been detected in another branch of the parallel make
nbmake[1]: stopped in /usr/obj/prep/netbsd-8/objdir/sys/arch/prep/compile/GENERIC/lib/compat
*** [/usr/obj/prep/netbsd-8/objdir/sys/arch/prep/compile/GENERIC/lib/compat/libcompat.a] Error code 2

nbmake: stopped in /usr/obj/prep/netbsd-8/objdir/sys/arch/prep/compile/GENERIC
2 errors

nbmake: stopped in /usr/obj/prep/netbsd-8/objdir/sys/arch/prep/compile/GENERIC

ERROR: Failed to make all in "/usr/obj/prep/netbsd-8/objdir/sys/arch/prep/compile/GENERIC"
*** BUILD ABORTED ***


This looks like the commit that caused it:
http://cvsweb.netbsd.org/bsdweb.cgi/src/sys/arch/prep/prep/residual.c.diff?r1=1.16&r2=1.17&only_with_tag=MAIN&f=h
I'm by no means an expert in c, so someone might want to take a quick look and see if preceding for loop actually needs to use the t pointer or could be reworked like the changed for loop. A quick fix is to just add the t pointer back in.
>How-To-Repeat:
Enable kernel option in port-prep:
options         RESIDUAL_DATA_DUMP      # verbosely dump residual data

>Fix:
--- /usr/src/sys/arch/prep/prep/residual.c      2020-02-22 01:06:15.911692786 -0700
+++ /usr/src/sys/arch/prep/prep/residual.c      2020-02-22 01:06:43.998595618 -0700
@@ -913,7 +913,7 @@
 large_vendor_pcibridge_subr(struct _L4_PPCPack *p, void *v, int size)
 {
        int i, numslots;
-       char tmpstr[30];
+       char tmpstr[30],*t;
        PCIInfoPack *pi = v;
        static const unsigned char *intrtype[] =
            { "8259", "MPIC", "RS6k BUID %d" };

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.46 2020/01/03 16:35:01 leot Exp $
$NetBSD: gnats_config.sh,v 1.9 2014/08/02 14:16:04 spz Exp $
Copyright © 1994-2020 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.