Update rust-rocksdb to fix build with clang 21+ (Xcode 16+)#3422
Merged
Pana merged 1 commit intoConflux-Chain:masterfrom Mar 30, 2026
Merged
Update rust-rocksdb to fix build with clang 21+ (Xcode 16+)#3422Pana merged 1 commit intoConflux-Chain:masterfrom
Pana merged 1 commit intoConflux-Chain:masterfrom
Conversation
Xcode 16+ ships clang 21 which introduces two new warnings that break the RocksDB/Titan C++ build: - -Wunnecessary-virtual-specifier: flags virtual methods in final classes (triggered by InternalKeyComparator and others in RocksDB headers). Fixed in both rocksdb and titan CMake flags by adding a guarded -Wno-unnecessary-virtual-specifier. - -Wdangling-assignment-gsl: caught a real dangling pointer bug in titan/src/version_edit.cc where s.ToString().c_str() assigned a pointer from a temporary std::string. Fixed by holding the string in a local variable. Upstream fixes: - Conflux-Chain/titan conflux-fixed-version: 0cfd672 - Conflux-Chain/rocksdb conflux-fixed-version: 0e5b299 - Conflux-Chain/rust-rocksdb fix/clang21-warnings: b84f1c0
Pana
approved these changes
Mar 30, 2026
Member
Pana
left a comment
There was a problem hiding this comment.
@Pana reviewed 4 files and all commit messages.
Reviewable status:complete! all files reviewed, all discussions resolved (waiting on peilun-conflux).
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.
Summary
Xcode 16+ ships clang 21 which introduces two new warnings that break the RocksDB/Titan C++ build under
-Werror:-Wunnecessary-virtual-specifier: flagsvirtualmethods infinalclasses (e.g.InternalKeyComparatorin RocksDB headers). This is a style warning with no semantic effect — suppressing it is safe.-Wdangling-assignment-gsl: caught a real latent bug intitan/src/version_edit.ccwheres.ToString().c_str()assigned a pointer from a temporarystd::string(dangling after end of statement). Fixed by holding the string in a local variable.Changes
This PR bumps the
rust-rocksdbrev to pick up fixes in the submodule chain:-Wunnecessary-virtual-specifier, fix dangling pointer inversion_edit.cc-Wunnecessary-virtual-specifierTest plan
cargo build --releasesucceeds on macOS with Xcode 16+ (clang 21)🤖 Generated with Claude Code
This change is