On 16 May 2018, at 15:54, Mike Tancsa <[email protected]> wrote:
> 
> On 5/15/2018 2:31 PM, Dimitry Andric wrote:
>> On 15 May 2018, at 20:22, Mike Tancsa <[email protected]> wrote:
>>> 
>>>> 
>>>> Anyone else see this ?
>> 
>> See <https://bugs.freebsd.org/227552>.  There is a fix coming up.
> 
> I tried the patch and did a full rebuild and it indeed fixed the problem
> for me.  Is the bug potentially more wide spread that just libxo ? Also
> does it possibly affect amd64, just in a non obvious way ?

Yes to both, at least theoretically.  The problem is actually in
elftoolchain's strip command, which can mess up the TLS section in an
executable or shared library.  When the dynamic linker loads such a bad
file, it will setup incorrect TLS data, which can lead to crashes.

In case of libxo.so.0, this appears to have been caused by clang 6
giving a slightly different ELF layout than clang 5.  During buildworld,
libxo.so.0 is built with debugging information, which is later copied
to a libxo.so.0.debug file, while it is removed from the original
libxo.so.0 file.

Up to this point, everything is still fine with libxo.so.0, still, but
during installworld, the file is stripped *again*, by install -s (this
is something we should revisit because it seems no longer useful).  This
second round of stripping messes up the TLS section.

-Dimitry

Attachment: signature.asc
Description: Message signed with OpenPGP

Reply via email to