svn commit: r330883 - head/stand/userboot/userboot
Andriy Gapon
avg at FreeBSD.org
Wed Mar 14 12:44:50 UTC 2018
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
More information about the svn-src-all
mailing list