fix(build): phpize-clean default + stale .so removal (SIGSEGV fix)#558
Merged
Conversation
The /ext directory is a shared bind mount across all 12 Docker containers (PHP 8.2-8.5 x FB 3/4/5). If a container compiled against FB 5.0 headers (FB_API_VER=50) and a subsequent container with FB 3.0 loads the stale .so, IResultSet::close() dispatches through a vtable slot that doesn't exist in FB 3.0's libfbclient -> NULL function pointer -> SIGSEGV during shutdown. Root cause: Stale .so compiled against FB 5.0 headers, loaded with FB 3.0 client. The #if FB_API_VER >= 40 guard in closeCursor() (fb_statement.hpp:409) works correctly when the .so matches the runtime library - the bug only manifests on header/library version mismatch. Changes: - build-extension action: default phpize-clean 'false' -> 'true' - build-extension action: rm -f stale .so files before phpize --clean - ci.yml: add stale .so removal + phpize --clean to pdo_fbird standalone build - .gitignore: add /debian/ and /dist/ build output directories Validated: 12/12 containers pass (4,321 tests, 0 failures) after building in FB5 container first (worst-case stale-.so scenario). Fixes: PHP 8.5/FB3 SIGSEGV during CI (was incorrectly attributed to PHP 8.5 compatibility - it was a stale build artifact issue)
satwareAG-ironMike
added a commit
that referenced
this pull request
Jul 21, 2026
CI/CD pipeline fixes: - .deb Docker image: Ubuntu base + Sury PPA (fixes jammy/noble) - release-linux.yml: cache PHP source + Firebird SDK + retry on 504 - release-windows.yml: PHP SDK availability check + retry - publish-release.yml: relax asset requirements for RC tags - build-matrix.sh: is_ubuntu() helper + conditional Sury PPA setup Version bump: - VERSION.txt: 13.0.1 -> 13.0.1-rc.1 - stubs/*.php: @Version 13.0.1 -> 13.0.1-rc.1 - CHANGELOG.md: [13.0.1-rc.1] section with all fixes Sigsegv fix (from PR #558, already merged to main): - phpize-clean default: false -> true - Stale .so removal before phpize --clean - Root cause: FB 5.0 headers compiled .so loaded with FB 3.0 client - Validated: 12/12 containers pass (4,321 tests, 0 failures)
This was referenced Jul 21, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Root Cause
PHP 8.5/FB3 SIGSEGV during CI was caused by a stale compiled against FB 5.0 headers being loaded with the FB 3.0 client library.
The
/extdirectory is a shared bind mount across all 12 Docker containers. When a FB5 container compilesfirebird.so(FB_API_VER=50, which includesIResultSet::deprecatedClose()in the vtable), and a FB3 container then loads that stale.so, theIResultSet::close()call dispatches through a vtable slot that doesn't exist in FB 3.0'slibfbclient→ NULL function pointer → SIGSEGV during PHP shutdown.The
#if FB_API_VER >= 40guard incloseCursor()(fb_statement.hpp:409) is correct — it usesrelease()on FB 3.0 andclose()on FB 4.0+. The bug only manifests on header/library version mismatch.Changes
.github/actions/build-extension/action.ymlphpize-clean'false'→'true'; addrm -f modules/firebird.so pdo_fbird/modules/pdo_fbird.sobeforephpize --clean.github/workflows/ci.yml.soremoval +phpize --cleantopdo_fbirdstandalone build step.gitignore/debian/and/dist/build output directoriesGDB Backtrace (before fix)
Full 12-Container Matrix Validation
Built in FB5 container first (creates stale
.sowithdeprecatedClosesymbols), then built + tested each container (worst-case scenario).12/12 PASS, 4,321 tests, 0 failures.
Code Review
Reviewed via task tool — no bugs found. Two notes addressed:
pdo_fbirdstandalone build inci.ymlnow also cleans stale.so+phpize --cleantest_oop_multi.php,test_sigsegv.php) cleaned up,debian/anddist/added to.gitignore