Skip to content

436: pre-packaged binary exts#489

Open
asgrim wants to merge 19 commits intophp:1.4.xfrom
asgrim:436-prepackaged-binary-exts
Open

436: pre-packaged binary exts#489
asgrim wants to merge 19 commits intophp:1.4.xfrom
asgrim:436-prepackaged-binary-exts

Conversation

@asgrim
Copy link
Contributor

@asgrim asgrim commented Jan 26, 2026

Fixes #436

@asgrim asgrim added this to the 1.4.0 milestone Jan 26, 2026
@asgrim asgrim self-assigned this Jan 26, 2026
@asgrim asgrim added the enhancement New feature or request label Jan 26, 2026
@asgrim asgrim marked this pull request as draft January 26, 2026 12:22
@asgrim asgrim force-pushed the 436-prepackaged-binary-exts branch 2 times, most recently from 74b9986 to 22ac08d Compare February 3, 2026 18:18
@asgrim asgrim force-pushed the 436-prepackaged-binary-exts branch from 22ac08d to e254033 Compare February 5, 2026 16:45
asgrim added 19 commits February 6, 2026 17:29
…ackaged-binary and a bunch of tests to be implemented
It seems that directly copying the new .so over the old one is slightly
different to rm the old .so then copying the new one. This fixes a segfault
that was observed when an existing ext was already in the ext directory. This
didn't manifest before, because `make install` (the approach used by compiling
from source) uses basically:

    $extSrcPath/build/shtool --debug install -c {$extSrcPath}modules/* $dest

This is a shell script, and ultimately it boils down to:

 - cp (or mv) the .so to a temp file in the dest path
 - rm the dest file
 - mv the temp file to the dest file

It was observed that this approach did not cause the segfault, but previous to
this commit, PIE was only doing:

 - cp the .so to the dest file

It seems there is some much lower-level differences in how these operations
affect the running processes, so this commit changes PIE to `rm` the target
file if it already exists first, which seems to solve the issue.
@asgrim asgrim force-pushed the 436-prepackaged-binary-exts branch from 04a791f to ae7ae40 Compare February 6, 2026 17:29
@asgrim asgrim marked this pull request as ready for review February 6, 2026 17:47
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 for prebuilt binaries for extensions

1 participant