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

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 ('{}')     

@github-project-automation github-project-automation bot moved this to Unconfirmed in NDK r27 Mar 25, 2024
@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 moved this from Unconfirmed to Needs prebuilt update in NDK r27 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

@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

@ZijunZhaoCCK Please see this: llvm/llvm-project#86914

@yujincheng08
Copy link
Author

@pirama-arumuga-nainar
Copy link
Collaborator

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

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 [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

@github-project-automation github-project-automation bot moved this from Needs prebuilt update to Merged in NDK r27 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
@github-project-automation github-project-automation bot moved this from Merged to Triaged in NDK r27 Apr 11, 2024
@DanAlbert DanAlbert moved this from Triaged to Needs cherry-pick in NDK r27 Apr 11, 2024
@DanAlbert DanAlbert assigned DanAlbert and unassigned ZijunZhaoCCK Apr 11, 2024
@DanAlbert DanAlbert moved this from Needs cherry-pick to Merged in NDK r27 Jun 4, 2024
@github-project-automation github-project-automation bot moved this to Prebuilts submitted in LLVM Aug 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Prebuilts submitted
Status: Merged
Development

No branches or pull requests

4 participants