Skip to content

Update rust-rocksdb to fix build with clang 21+ (Xcode 16+)#3422

Merged
Pana merged 1 commit intoConflux-Chain:masterfrom
peilun-conflux:fix/rocksdb-clang21
Mar 30, 2026
Merged

Update rust-rocksdb to fix build with clang 21+ (Xcode 16+)#3422
Pana merged 1 commit intoConflux-Chain:masterfrom
peilun-conflux:fix/rocksdb-clang21

Conversation

@peilun-conflux
Copy link
Copy Markdown
Contributor

@peilun-conflux peilun-conflux commented Mar 29, 2026

Summary

Xcode 16+ ships clang 21 which introduces two new warnings that break the RocksDB/Titan C++ build under -Werror:

  • -Wunnecessary-virtual-specifier: flags virtual methods in final classes (e.g. InternalKeyComparator in RocksDB headers). This is a style warning with no semantic effect — suppressing it is safe.
  • -Wdangling-assignment-gsl: caught a real latent bug in titan/src/version_edit.cc where s.ToString().c_str() assigned a pointer from a temporary std::string (dangling after end of statement). Fixed by holding the string in a local variable.

Changes

This PR bumps the rust-rocksdb rev to pick up fixes in the submodule chain:

Test plan

  • cargo build --release succeeds on macOS with Xcode 16+ (clang 21)

🤖 Generated with Claude Code


This change is Reviewable

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
@peilun-conflux peilun-conflux requested a review from Pana March 29, 2026 14:41
Copy link
Copy Markdown
Member

@Pana Pana left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Pana reviewed 4 files and all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on peilun-conflux).

@Pana Pana merged commit 028a7f7 into Conflux-Chain:master Mar 30, 2026
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants