buildworld: /usr/bin/ar segfault

From: Eric van Gyzen <vangyzen_at_FreeBSD.org>
Date: Fri, 3 Jun 2016 12:23:23 -0500
My buildworld just failed very early with a segfault from /usr/bin/ar:

    --------------------------------------------------------------
    >>> stage 1.1: legacy release compatibility shims
    --------------------------------------------------------------
    ...
    --- libegacy.a ---
    building static egacy library
    ar -crD libegacy.a `NM='nm' NMFLAGS='' lorder dummy.o  | tsort -q`
    Segmentation fault (core dumped)
    *** [libegacy.a] Error code 139


In __archive_write_allocate_filter(), a->filter_last was pointing to
archive_write_ar_header().  a->format_write_header should have pointed
to this function.  The offset between these two fields in struct archive
is 48 bytes.  Sure enough, that structure recently grew by 48 bytes.

This would seem to indicate that ar (or libarchive.a) was built with
mismatched objects.  Unfortunately, I don't have good records of what
build options and flags I used.  I /think/ I used either
-DWITH_SYSTEM_COMPILER or no options at all.  Well, I always use -j4. 
The "ar" that segfaulted seems to be /usr/bin/ar, so it's from r300692. 
Thanks to my list of Boot Environments (yay), I'm pretty sure I was
running r298525 when I built r300692 (and I was running r297692 when I
built r298525).  I installed r297692 from the snapshot memstick.img.

I recovered by restoring ar (and ranlib) from an old BE (yay again!). 
I'm reporting this in case there is a bug in the build and someone is
willing to go hunting for it based on this vague report.  :)

Eric
Received on Fri Jun 03 2016 - 15:23:24 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:41:05 UTC