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

[Bug] clang frontend crashes on NDK 28.0.11617993 #2007

Closed
yujincheng08 opened this issue Mar 25, 2024 · 11 comments
Closed

[Bug] clang frontend crashes on NDK 28.0.11617993 #2007

yujincheng08 opened this issue Mar 25, 2024 · 11 comments
Assignees
Labels
Projects

Comments

@yujincheng08
Copy link

yujincheng08 commented Mar 25, 2024

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 llvm/llvm-project#86769

Upstream bug

llvm/llvm-project#86769

Commit to cherry-pick

llvm/llvm-project@0f6ed4c

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

@pirama-arumuga-nainar
Copy link
Collaborator

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 ('{}')     
@DanAlbert
Copy link
Member

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.

@DanAlbert DanAlbert added this to Awaiting triage in LLVM via automation Mar 25, 2024
@DanAlbert DanAlbert moved this from Awaiting triage to Needs upstream bug in LLVM Mar 25, 2024
@pirama-arumuga-nainar
Copy link
Collaborator

This works in clang-r510928. So the bisect window is between r510928 and r522817.

@yujincheng08
Copy link
Author

yujincheng08 commented Mar 26, 2024

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.

@yujincheng08
Copy link
Author

Submitted a bug report to upstream: llvm/llvm-project#86769

@DanAlbert DanAlbert moved this from Needs upstream bug to Awaiting fix in LLVM Mar 27, 2024
@ZijunZhaoCCK
Copy link
Collaborator

I check out to e4a4122eb6768b69640173b4c32fd88de4547227: llvm/llvm-project#71040 and can reproduce the crash. And this works in its last commit: e9db60c05e2fb96ff40cbb1f78790abc5de9237e llvm/llvm-project#70991 .

@yujincheng08
Copy link
Author

@pirama-arumuga-nainar
Copy link
Collaborator

@ZijunZhaoCCK please cherry-pick llvm/llvm-project@0f6ed4c to llvm-toolchain.

@DanAlbert DanAlbert moved this from Awaiting fix to Awaiting update in LLVM Mar 29, 2024
bvlgah pushed a commit to bvlgah/llvm_android_mirror that referenced this issue Mar 30, 2024
….11617993

0f6ed4c394f [clang][Sema] Fix a CTAD regression after 42239d2e9 (#86914)

This change is generated automatically by the script:
  cherrypick_cl.py --sha 0f6ed4c --verify-merge --create-cl

Bug: android/ndk#2007
Test: N/A
Change-Id: I785e014f8eaf6a438a0a5567f710bce3e79fc1ad
@yujincheng08 yujincheng08 changed the title [Bug]: clang frontend crashes on NDK 28.0.11617993 Apr 2, 2024
@yujincheng08
Copy link
Author

yujincheng08 commented Apr 11, 2024

confirmed fixed in 28.0.11699160

@DanAlbert DanAlbert moved this from Awaiting update to Prebuilts submitted in LLVM Apr 11, 2024
@DanAlbert
Copy link
Member

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.

@DanAlbert DanAlbert reopened this Apr 11, 2024
LLVM automation moved this from Prebuilts submitted to Awaiting triage Apr 11, 2024
@DanAlbert DanAlbert moved this from Awaiting triage to Prebuilts submitted in LLVM Apr 11, 2024
@DanAlbert DanAlbert assigned DanAlbert and unassigned ZijunZhaoCCK Apr 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
4 participants