Bug 108165 - Assembler is incompatible with musl
Summary: Assembler is incompatible with musl
Status: RESOLVED DUPLICATE of bug 35268
Alias: None
Product: Mesa
Classification: Unclassified
Component: Other (show other bugs)
Version: 18.1
Hardware: Other All
: medium normal
Assignee: mesa-dev
QA Contact: mesa-dev
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-10-03 13:37 UTC by Ross Burton
Modified: 2018-10-04 00:55 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments

Description Ross Burton 2018-10-03 13:37:44 UTC
Quoting from a patch to disable assembler in the OpenEmbedded recipe:

Musl started blocking dlopen of libs with initial-exec references into
dynamic TLS area, via

https://github.com/kraj/musl/commit/5c2f46a214fceeee3c3e41700c51415e0a4f1acd

prior to that commit, musl was loading it and silently letting
subsequent TLS accesses via the miscompiled code clobber memory that
didn't belong to them

This was wrong behavior and it relied on additional space reserved by
libc in TLS space to adjust fo such broken libs, but it also fails
with glibc if the reserved space was already used up

Right fix is that  mesa should be patched to remove all the
initial-exec hacks and use real TLS, and -mtls-dialect=gnu2 (TLSDESC)
should be used on archs it's supported on (i386, x86_64, and aarch64)
to make up for the lost performance, but mesa hardcodes the initial-exec,
so there must be a reason that probably is better known to mesa devs.

Cause is some unknown part of mesa's x86 assembly code is broken by
readonly text segments

(CCing Khem who created the patch)
Comment 1 Nicholas Miell 2018-10-04 00:55:39 UTC

*** This bug has been marked as a duplicate of bug 35268 ***


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.