Date: Wed, 14 Mar 2018 14:44:37 +0200 From: Andriy Gapon <avg@FreeBSD.org> To: Gleb Smirnoff <glebius@freebsd.org>, 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: <45a6c658-1133-ad46-d8df-48ee5bbccddf@FreeBSD.org> In-Reply-To: <201803132254.w2DMsU2r005593@repo.freebsd.org> References: <201803132254.w2DMsU2r005593@repo.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
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. -- Andriy Gapon
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?45a6c658-1133-ad46-d8df-48ee5bbccddf>