Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Since approximately MacOS 15, the dynamic loader changes the format of the TLV thunk, breaking our resolution code.
Here we use the new format when we detect the new loader.
This is not a regression of the new TLS resolution code. This targets 8.5, but this needs to be backported to 8.3.
Some background: https://github.com/apple-oss-distributions/dyld/blob/9307719dd8dc9b385daa412b03cfceb897b2b398/libdyld/ThreadLocalVariables.h#L46. Since MacOS 15, the dynamic loader patches the data emitted by the compiler, so that its format changes from
to
which has the same size, but not the same layout.
Possible alternative fixes:
php-src/ext/opcache/jit/zend_jit_ir.c
Line 519 in 02e38fe
thunk->func(thunk)
, which has more ABI garantees that the current method, but will be slowercc @shivammathur