You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When we tried to switch from NDK r24 to r25c, our application has started to crash when compiled to armv7.
Unfortunately, I couldn't easily minimize our code to submit it here, but I managed to reproduce the same crash on armv7 Linux using upstream clang 15.0.7. Updating clang to 16.0.1 solved the crash, so I bisected the llvm-project repo to find that the necessary commit for the fix is llvm/llvm-project@8a09875. The fix itself is not armv7 specific, I assume it can cause problems on any platform.
I tried to cherry-pick the commit onto llvm/llvm-project@282c83c which clang-r450784d1 is based on which is included in NDK r25c, there is a conflict in the test case that this fix modifies but the fix itself in llvm/lib/Analysis/InstructionSimplify.cpp is ok and works, it no longer crashes.
I don't think we're going to be doing an r25d, so we'll get this "for free" when we update the compiler in r26. Leaving this open since we don't actually have a newer working compiler for r26 yet.
Description
When we tried to switch from NDK r24 to r25c, our application has started to crash when compiled to armv7.
Unfortunately, I couldn't easily minimize our code to submit it here, but I managed to reproduce the same crash on armv7 Linux using upstream clang 15.0.7. Updating clang to 16.0.1 solved the crash, so I bisected the llvm-project repo to find that the necessary commit for the fix is llvm/llvm-project@8a09875. The fix itself is not armv7 specific, I assume it can cause problems on any platform.
I found a discussion here https://discourse.llvm.org/t/instcombine-struct-w-padding-aggregate-loads-stores-as-scalars/67035/5 that describes the issue and has small testcases that can reproduce the miscompilation, but on CUDA target. I don't have a small isolated testcase for Android, I hope the information I'm providing here is enough.
I tried to cherry-pick the commit onto llvm/llvm-project@282c83c which clang-r450784d1 is based on which is included in NDK r25c, there is a conflict in the test case that this fix modifies but the fix itself in llvm/lib/Analysis/InstructionSimplify.cpp is ok and works, it no longer crashes.
Please cherry-pick the llvm/llvm-project@8a09875 commit into the next NDK release.
Upstream bug
llvm/llvm-project#59156
Commit to cherry-pick
llvm/llvm-project@8a09875
Affected versions
r25
Canary version
No response
Host OS
Linux
Host OS version
Debian 11
Affected ABIs
armeabi-v7a
The text was updated successfully, but these errors were encountered: