Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 3 Jun 2016 21:41:10 -0700
From:      Tim Kientzle <tim@kientzle.com>
To:        Eric van Gyzen <vangyzen@freebsd.org>
Cc:        "current@freebsd.org" <current@freebsd.org>
Subject:   Re: buildworld: /usr/bin/ar segfault
Message-ID:  <8A7BD41B-4764-4C0F-990A-9677054761D8@kientzle.com>
In-Reply-To: <1962f7f5-652a-a2f4-c443-0dfab7a3e80d@FreeBSD.org>
References:  <1962f7f5-652a-a2f4-c443-0dfab7a3e80d@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help

> On Jun 3, 2016, at 10:23 AM, Eric van Gyzen <vangyzen@freebsd.org> =
wrote:
>=20
> My buildworld just failed very early with a segfault from /usr/bin/ar:
>=20
>    --------------------------------------------------------------
>>>> stage 1.1: legacy release compatibility shims
>    --------------------------------------------------------------
>    ...
>    --- libegacy.a ---
>    building static egacy library
>    ar -crD libegacy.a `NM=3D'nm' NMFLAGS=3D'' lorder dummy.o  | tsort =
-q`
>    Segmentation fault (core dumped)
>    *** [libegacy.a] Error code 139
>=20
>=20
> 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.
>=20
> 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.

The build of 'ar' shouldn't matter since it's a client of libarchive
and libarchive clients do not ever see or manipulate the internals of
struct archive_write.

The problem would be with the build of the libarchive library.
It sounds like you somehow had a stale archive_write_set_format_ar.o
that did not get rebuilt when archive_write_private.h got updated =
recently.

If you still have the /usr/obj tree around, could you check the dates on =
these
files:
   archive_write_set_format_ar.o (in /usr/obj)
   archive_write_private.h (in /usr/src)

If those dates are in the wrong order (the .o should be newer), then
the make definitely went awry somewhere.

Tim




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?8A7BD41B-4764-4C0F-990A-9677054761D8>