Repository navigation
Rename bundled SQLite symbols in HHVM OSS Rust FFI staticlib - #9872
Open
mszabo-wikia wants to merge 1 commit into
Open
mszabo-wikia wants to merge 1 commit into
mszabo-wikia wants to merge 1 commit into
Conversation
rusqlite is built with its "bundled" feature, which statically links a private SQLite copy (currently 3.53.2) into libhhvm_ffi_bridge.a. When linked into hhvm, those definitions took precedence over the system libsqlite3 that ext_sqlite3 and ext_pdo_sqlite are configured against, so both extensions silently ran on rusqlite's SQLite. This then caused unexpected sqlite3 behavior changes during updates. After cargo builds the staticlib, prefix every global sqlite3* symbol (definitions and references alike) with hackc_ via objcopy --redefine-syms. The Rust side keeps its bundled SQLite and the autocargo-generated Cargo.toml files stay untouched. Co-Authored-By: Claude <svc-devxp-claude@slack-corp.com>
Contributor
|
This pull request has been imported. If you are a Meta employee, you can view this in D124984919. (Because this pull request was imported automatically, there will not be any future comments.) |
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.
rusqlite is built with its "bundled" feature, which statically links a private SQLite copy (currently 3.53.2) into libhhvm_ffi_bridge.a. When linked into hhvm, those definitions took precedence over the system libsqlite3 that ext_sqlite3 and ext_pdo_sqlite are configured against, so both extensions silently ran on rusqlite's SQLite. This then caused unexpected sqlite3 behavior changes during updates.
After cargo builds the staticlib, prefix every global sqlite3* symbol (definitions and references alike) with
hackc_viaobjcopy --redefine-syms. The Rust side keeps its bundled SQLite and the autocargo-generated Cargo.toml files stay untouched.