Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix C++23 compilation errors in leveldb #47

Open
wants to merge 2 commits into
base: bitcoin-fork
Choose a base branch
from

Conversation

fanquake
Copy link
Member

@fanquake fanquake commented Jan 30, 2025

Cherry-picks two commits from upstream (google@302786e, google@e829478), which remove the usage of std::aligned_storage/std::aligned_union.

Note the first cherry-pick is not clean, because due to Google tooling issues, it accidently contained a revert of the prior two commits. See google#1249 for more details, as well as https://issues.chromium.org/issues/388068052.

Closes #43.

leveldb Team added 2 commits January 30, 2025 11:58
Remove usages of std::aligned_storage, which is deprecated.
More details about the replacement in https://crbug.com/388068052.

PiperOrigin-RevId: 713346733
cl/713346733 changed the type of some variables to pointers, but didn't adjust the placement new statements. From pkasting@: "I suspect your code is wrong and will crash. An array is a pointer, so taking its address also gives a pointer, which is why it compiles; but the value of that pointer is different. You're no longer providing the address of the storage, but rather the address of the array pointer."

PiperOrigin-RevId: 717926210
@victorvianna
Copy link

FYI the upstream PR landed

@fanquake
Copy link
Member Author

fanquake commented Jan 31, 2025

Chromium has also re-rolled to the current upstream: https://issues.chromium.org/issues/388068052#comment10.

@hebasto
Copy link
Member

hebasto commented Feb 3, 2025

FYI the upstream PR landed

Undraft then?

@fanquake fanquake marked this pull request as ready for review February 3, 2025 16:27
@dergoegge
Copy link
Member

utACK 183e79a

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.

Compilation with std=c++23
4 participants