forked from microsoft/DirectXShaderCompiler
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix crash in dominator tree construction used by DiagnoseRaytracingPa…
…yloadAccess (microsoft#5605) Fix crash if a RayGen shader contains a `while(true)` loop, caused by dominator tree construction not ignoring `nullptr` successor AST nodes which occur in this case. Also add regression test case. Fixes microsoft#5035. Co-authored-by: Jannik Silvanus <[email protected]>
- Loading branch information
1 parent
22bb078
commit 16d43a5
Showing
2 changed files
with
15 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 11 additions & 0 deletions
11
...est/HLSLFileCheck/hlsl/diagnostics/warnings/diagnose_raytracing_payload_access_crash.hlsl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
// RUN: %dxc -E RayGen -T lib_6_7 %s | FileCheck %s | ||
|
||
// Regression test for crashing in DiagnoseRaytracingPayloadAccess | ||
// due to a trivial while(true) loop. | ||
|
||
// CHECK: define void @"\01?RayGen@@YAXXZ"() | ||
[shader("raygeneration")] void RayGen() { | ||
while (true) { | ||
break; | ||
} | ||
} |