Skip to content

Conversation

@sj-i
Copy link
Member

@sj-i sj-i commented Apr 6, 2024

This resolves #450 .

Completely WIP, but the POC now works.

ZTS PHP binaries have only small size of the PT_TLS segment as a whole, like 0x13c bytes.

This means that we can search the offset of the actual _tsrm_ls_cache without resolving the symbol by brute forcing the PT_TLS segment. By examining each candidate of the offset by actually trying to resolve EG and see the value of uninitialized_zval and error_zval, and also trying to resolve a global constant like PHP_VERSION, we can assume the candidate is really the offset of _tsrm_ls_cache.
@sj-i sj-i added the enhancement New feature or request label Apr 6, 2024
@sj-i sj-i added this to the 0.12.0 milestone Apr 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support stripped ZTS binaries

2 participants