From owner-freebsd-current@freebsd.org Sun Jun 3 12:22:00 2018 Return-Path: Delivered-To: freebsd-current@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2C5EAF7408B for ; Sun, 3 Jun 2018 12:22:00 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 83BBA82303 for ; Sun, 3 Jun 2018 12:21:59 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from tom.home (kib@localhost [127.0.0.1]) by kib.kiev.ua (8.15.2/8.15.2) with ESMTP id w53CLguZ038423; Sun, 3 Jun 2018 15:21:45 +0300 (EEST) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua w53CLguZ038423 Received: (from kostik@localhost) by tom.home (8.15.2/8.15.2/Submit) id w53CLg5d038422; Sun, 3 Jun 2018 15:21:42 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Sun, 3 Jun 2018 15:21:42 +0300 From: Konstantin Belousov To: David Wolfskill , "Alex V. Petrov" , FreeBSD Current Subject: Re: Error build nvidia-driver with r334555 Message-ID: <20180603122142.GM3789@kib.kiev.ua> References: <83fec8d8-699f-e86c-9884-9d8698a86a91@gmail.com> <20180603120834.GT1389@albert.catwhisker.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180603120834.GT1389@albert.catwhisker.org> User-Agent: Mutt/1.10.0 (2018-05-17) X-Spam-Status: No, score=-2.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=3.4.1 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on tom.home X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 03 Jun 2018 12:22:00 -0000 On Sun, Jun 03, 2018 at 05:08:34AM -0700, David Wolfskill wrote: > On Sun, Jun 03, 2018 at 06:48:01PM +0700, Alex V. Petrov wrote: > > .... > > --- nvidia_subr.o --- > > > > > > nvidia_subr.c:367:26: error: 'memset' call operates on objects of type > > 'struct nv_ioctl_card_info' while the size is based on a different type > > 'struct nv_ioctl_card_info *' [-Werror,-Wsizeof > > -pointer-memaccess] > > memset(ci, 0, sizeof(ci)); > > ~~ ^~ > > nvidia_subr.c:367:26: note: did you mean to dereference the argument to > > 'sizeof' (and multiply it by the number of elements)? > > > > memset(ci, 0, sizeof(ci)); > > ^~ > > 1 error generated. > > *** [nvidia_subr.o] Error code 1 > > .... > > Aye; please ref. > for > additional details. > > The issue has been narrowed down to the range r334529 - r334535; I'm > suspecting r334533 and/or r334534. (Not that the commits are in any way > "faulty" -- merely that the nvidia-driver port may need some "evasive > action" to allow for the change). Even not looking at the actual code, I am quite sure that the line nvidia_subr.c:367 should be changed to memset(ci, 0, sizeof(*ci)); This is a bug in the driver sources.