-
Notifications
You must be signed in to change notification settings - Fork 266
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
[Bug] potential upcoming ABI break in libc++ #1963
Labels
Comments
Not a regression, so whether or not this is included in r26c will depend on whether it's a clean cherry-pick or not. |
Doesn't cherry-pick cleanly to r26's toolchain. Safer to punt to r27 (where this will apply cleanly: branch point: Oct 25, fix merge date: Oct 30). |
SGTM, thanks for checking. |
foxsen
pushed a commit
to android-la64/platform-ndk
that referenced
this issue
Oct 10, 2024
Bug: android/ndk#1728 Bug: android/ndk#1853 Bug: android/ndk#1928 Bug: android/ndk#1947 Bug: android/ndk#1953 Bug: android/ndk#1963 Bug: android/ndk#1973 Bug: android/ndk#1988 Test: ./checkbuild.py && ./run_tests.py Change-Id: Ib319c4f80c107e57ede6b6130d81d6d1cd87e22d
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Description
tl;dr: do not use
std::expected
at ABI boundarieshttps://discourse.llvm.org/t/abi-break-in-libc-for-a-17-x-guidance-requested/74483 warns about an impending ABI break required to fix UB in
std::expected
.The good news is that atm the libc++ folks think the ABI break will only be rarely noticeable:
https://discord.com/channels/636084430946959380/636732894974312448/1168654171940065330
The discourse thread suggest we cherry-pick llvm/llvm-project#68733 to fix the UB, but they want to make a more complete (better performance?) fix going forward that will be an ABI break.
I don't think that's set in stone yet, but if you want to defend against incompatibility with future NDKs, don't use
std::expected
at ABI boundaries (that's mostly a problem for middleware vendors, if you build all your C++ code as part of your app, you should be safe) with r26 or older. We're considering potentially disablingstd::expected
in an r26 point release to avoid the bad ABI getting too far out into the wild.Upstream bug
llvm/llvm-project#70708
Commit to cherry-pick
llvm/llvm-project#68733
Affected versions
r26
Canary version
No response
Host OS
Linux, Mac, Windows
Host OS version
any
Affected ABIs
armeabi-v7a, arm64-v8a, x86, x86_64
The text was updated successfully, but these errors were encountered: