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
{{ message }}
Repository navigation
Regression, SIGSEGV instead of diagnostics when encountering bool operator==(const T&, const T&)Β #6426
changed the title [-][SPIRV] Regression, SIGSEGV instead of diagnostics when encountering bool operator==(const T&, const T&)[/-][+][SPIR-V] Regression, SIGSEGV instead of diagnostics when encountering bool operator==(const T&, const T&)[/+]on Mar 18, 2024
diff --git a/tools/clang/lib/Sema/SemaHLSL.cpp b/tools/clang/lib/Sema/SemaHLSL.cpp
index 31ff6a45851..704824c3822 100644
--- a/tools/clang/lib/Sema/SemaHLSL.cpp+++ b/tools/clang/lib/Sema/SemaHLSL.cpp@@ -15690,7 +15690,7 @@ void TryAddShaderAttrFromTargetProfile(Sema &S, FunctionDecl *FD,
// if this FD isn't the entry point, then we shouldn't add
// a shader attribute to this decl, so just return
- if (EntryPointName != FD->getIdentifier()->getName()) {+ if (FD->getIdentifier() && EntryPointName != FD->getIdentifier()->getName()) {
return;
}
changed the title [-][SPIR-V] Regression, SIGSEGV instead of diagnostics when encountering bool operator==(const T&, const T&)[/-][+]Regression, SIGSEGV instead of diagnostics when encountering bool operator==(const T&, const T&)[/+]on Mar 20, 2024
Activity
damyanp commentedon Mar 18, 2024
We also find that the compiler crashes in the non-spirv case as well, so we should have a look into this before declaring it spir-v specific.
[-][SPIRV] Regression, SIGSEGV instead of diagnostics when encountering bool operator==(const T&, const T&)[/-][+][SPIR-V] Regression, SIGSEGV instead of diagnostics when encountering bool operator==(const T&, const T&)[/+]cassiebeckley commentedon Mar 18, 2024
Minimal reproducible example:
llvm-beanz commentedon Mar 18, 2024
The fix for this is pretty straightforward:
We should craft some wider test cases too.
[-][SPIR-V] Regression, SIGSEGV instead of diagnostics when encountering bool operator==(const T&, const T&)[/-][+]Regression, SIGSEGV instead of diagnostics when encountering bool operator==(const T&, const T&)[/+]1 remaining item
[Sema] Check FunctionDecl has identifier before getName. (#6439)
damyanp commentedon Mar 21, 2024
Re-opening this to track getting the fix cherry-picked into the next point release.
[Sema] Check FunctionDecl has identifier before getName. (#6439) (#6457)
[Sema] Check FunctionDecl has identifier before getName. (microsoft#6439