Date: Wed, 14 Mar 2018 07:20:42 -0600 From: Warner Losh <imp@bsdimp.com> To: Andriy Gapon <avg@freebsd.org> Cc: Gleb Smirnoff <glebius@freebsd.org>, src-committers <src-committers@freebsd.org>, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r330883 - head/stand/userboot/userboot Message-ID: <CANCZdfr0ryxDNJHp5j2-goWpX1kdfDSmv3E87Jz8RuDCNZ5sHw@mail.gmail.com> In-Reply-To: <45a6c658-1133-ad46-d8df-48ee5bbccddf@FreeBSD.org> References: <201803132254.w2DMsU2r005593@repo.freebsd.org> <45a6c658-1133-ad46-d8df-48ee5bbccddf@FreeBSD.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Mar 14, 2018 6:45 AM, "Andriy Gapon" <avg@freebsd.org> wrote: On 14/03/2018 00:54, Gleb Smirnoff wrote: > Author: glebius > Date: Tue Mar 13 22:54:29 2018 > New Revision: 330883 > URL: https://svnweb.freebsd.org/changeset/base/330883 > > Log: > Fix typo that misteriously passes compilation. > > Modified: > head/stand/userboot/userboot/main.c > > Modified: head/stand/userboot/userboot/main.c > ============================================================ ================== > --- head/stand/userboot/userboot/main.c Tue Mar 13 21:42:38 2018 (r330882) > +++ head/stand/userboot/userboot/main.c Tue Mar 13 22:54:29 2018 (r330883) > @@ -159,7 +159,7 @@ extract_currdev(void) > //bzero(&dev, sizeof(dev)); > > #if defined(USERBOOT_ZFS_SUPPORT) > - CT_ASSERT(sizeof(struct disk_devdesc) >= sizeof(struct zfs_devdesc)); > + CTASSERT(sizeof(struct disk_devdesc) >= sizeof(struct zfs_devdesc)); > if (userboot_zfs_found) { > struct zfs_devdesc zdev; It seems that this was compiled to a call to an external CT_ASSERT function. Probably not enough warning flags to fail on a function without a prototype? Also, not sure how it worked at run-time. Maybe userboot.so is linked and loaded in such a way that it allows undefined symbols as long as they are not used. So, probably extract_currdev() just didn't get called. Anyway, thank you for spotting and fixing. I'll have to see if I can tighten up the warns to prevent this in the future. Warner
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CANCZdfr0ryxDNJHp5j2-goWpX1kdfDSmv3E87Jz8RuDCNZ5sHw>