[SPIR-V] Segfault: `vk::SpirvType` pointer as a push-constant member
Maintainers usually reply within 2 days
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 48/100
Research direction
Start with the SPIR-V code path that lowers vk::SpirvType members in push constants, then reproduce the crash using the HLSL snippet and flags in the issue. Compare the generated layout and memory model with the expected Offset 8 and PhysicalStorageBuffer64; done means compilation succeeds without a segfault and produces those results.
Written by the indexing model from the issue text.
Description
Version: DXC trunk (Compiler Explorer)
Flags: -spirv -T cs_6_8 -E main -HV 202x -fspv-target-env=vulkan1.3 -fvk-use-scalar-layout
[[vk::binding(0,0)]] RWStructuredBuffer<uint32_t> buf;
typedef vk::SpirvType</*OpTypePointer*/32, /*size*/8, /*alignment*/8,
vk::Literal<vk::integral_constant<uint32_t, /*PhysicalStorageBuffer*/5349> >, uint32_t> PhysicalUintPtr;
struct PushData
{
uint32_t a;
PhysicalUintPtr p;
};
[[vk::push_constant]] PushData pc;
[[vk::ext_capability(/*PhysicalStorageBufferAddresses*/5347)]]
[numthreads(64,1,1)]
void main(uint32_t gi : SV_GroupIndex)
{
buf[gi] = pc.a;
}
Expected: compiles; p at Offset 8, OpMemoryModel PhysicalStorageBuffer64.
Actual: Program terminated with signal SIGSEGV (11) Compiler returned: 139.
- Dominant language
- C++
- Stars
- 3.7k
- Forks
- 926
- Avg merge
- 3d 22h
- Merged PRs (30d)
- 45
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from microsoft/DirectXShaderCompiler
-
bug needs-triage
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
microsoft/DirectXShaderCompiler#9173 ·
Maintainers usually reply within 2 days
-
bug needs-triage
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
microsoft/DirectXShaderCompiler#9155 · 4 comments ·
Maintainers usually reply within 2 days
-
bug needs-triage
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
microsoft/DirectXShaderCompiler#9135 ·
Maintainers usually reply within 2 days
-
DXC emits DW_LANG_C_plus_plus instead of DW_LANG_HLSL for HLSLPossibly taken @rj123-nv claimed this 18 days ago. Openbug needs-triage
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
microsoft/DirectXShaderCompiler#9087 ·
Maintainers usually reply within 2 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
microsoft/DirectXShaderCompiler#9086 ·
Maintainers usually reply within 2 days
All issues in microsoft/DirectXShaderCompiler
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
Maintainers usually reply within 1 day
-
table_translator 当一个 Prism 键映射到多个原码时,首个候选未按权重排序Possibly taken A pull request linked to this issue is open or already merged. Openbug
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
feature:config kind:docs os:windows toolchain:cmake triaged
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
-
arch-based bug niri
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
noctalia-dev/noctalia#5552 ·
Maintainers usually reply within 1 day