ndk
ndk copied to clipboard
[Bug] clang frontend crashes on NDK 28.0.11617993
Description
When I try the ci version (see https://ci.android.com/builds/submitted/11617993/win64/latest) of NDK, it crashes on my project. See https://github.com/llvm/llvm-project/issues/86769
Upstream bug
https://github.com/llvm/llvm-project/issues/86769
Commit to cherry-pick
https://github.com/llvm/llvm-project/commit/0f6ed4c394fd8f843029f6919230bf8df8618529
Affected versions
Canary
Canary version
28.0.11617993
Host OS
All
Host OS version
Windows 11
Affected ABIs
armeabi-v7a, arm64-v8a, x86, x86_64
This is also broken with ToT. Building with assertions enabled, I get:
clang: /usr/local/google/work/llvm-monorepo/llvm-project/clang/lib/AST/ExprConstant.cpp:15798: bool clang::Expr::EvaluateAsConstantExpr(EvalResult &, const ASTContext &, ConstantExprKind) const: Assertion `!isValueDependent() && "Expression evaluator can't be called on a dependent expression."' failed.
...
1. D:/Android/Projects/LSPosed/external/lsplant/lsplant/src/main/jni/include/utils/jni_helper.hpp:179:61: current parser token ';'
2. D:/Android/Projects/LSPosed/external/lsplant/lsplant/src/main/jni/include/utils/jni_helper.hpp:18:1: parsing namespace 'lsplant'
3. D:/Android/Projects/LSPosed/external/lsplant/lsplant/src/main/jni/include/utils/jni_helper.hpp:178:64: parsing function body 'lsplant::JNI_NewStringUTF'
4. D:/Android/Projects/LSPosed/external/lsplant/lsplant/src/main/jni/include/utils/jni_helper.hpp:178:64: in compound statement ('{}')
Since this is a regression, triaging for r27. Since it's not fixed upstream yet, it probably won't be fixed in beta 1, but we can still pick it up in beta 2 or RC 1.
This works in clang-r510928. So the bisect window is between r510928 and r522817.
~Confirmed this is caused by concept
. Maybe it's fixed by llvm/llvm-project#83997?~
Never mind. I picked this PR but it still crashes.
Submitted a bug report to upstream: llvm/llvm-project#86769
I check out to e4a4122eb6768b69640173b4c32fd88de4547227: https://github.com/llvm/llvm-project/pull/71040 and can reproduce the crash. And this works in its last commit: e9db60c05e2fb96ff40cbb1f78790abc5de9237e https://github.com/llvm/llvm-project/pull/70991/ .
@ZijunZhaoCCK Please see this: https://github.com/llvm/llvm-project/pull/86914
@DanAlbert @pirama-arumuga-nainar fixed by upstream: https://github.com/llvm/llvm-project/commit/0f6ed4c394fd8f843029f6919230bf8df8618529
@ZijunZhaoCCK please cherry-pick https://github.com/llvm/llvm-project/commit/0f6ed4c394fd8f843029f6919230bf8df8618529 to llvm-toolchain.
confirmed fixed in 28.0.11699160
Reopening because I haven't updated the changelog (I didn't know the cherry-pick ever got done, thanks for confirming!)
https://android-review.googlesource.com/c/platform/ndk/+/3037382, but needs to be cherry-picked, and I can't do that yet.