On Mar 14, 2018 6:45 AM, "Andriy Gapon" <a...@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
_______________________________________________
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to