protonscr

dirt 5 - segfault in dxil-spirv

vkd3dclosed
HansKristian-Work/vkd3d-proton#493 · opened 2021-01-31 by CME42 · updated 2021-02-01 · 2 comments · github
CCME42 2021-01-31 github

The game dirt 5 crashes in vkd3d 2560c76861a111e77961c02f0ea79d1197736ce4 inside dxil-spirv.

208:trace:d3d12_device_CreatePipelineState: iface 0000000003da0050, desc 000000000021d790, riid {765a30f3-f624-4c6f-a828-ace948622445}, pipeline_state 0000000020d42328.
wine: Unhandled page fault on read access to 0000000000000108 at address 00000000008F05FC (thread 00d0), starting debugger...

With the dumped dxil the crash is reproducible on dxil-spirv master:

Program received signal SIGSEGV, Segmentation fault.
0x00007ffff7ed7c78 in dxil_spv::CFGNode::find_common_post_dominator (a=0x0, b=0x555555e0e350) at /home/cme/git/dxil-spirv/node.cpp:209
209			if (!a->immediate_post_dominator)
(gdb) bt
#0  0x00007ffff7ed7c78 in dxil_spv::CFGNode::find_common_post_dominator (a=0x0, b=0x555555e0e350) at /home/cme/git/dxil-spirv/node.cpp:209
#1  0x00007ffff7ed880d in dxil_spv::CFGNode::recompute_immediate_post_dominator (this=0x555555d647f0) at /home/cme/git/dxil-spirv/node.cpp:367
#2  0x00007ffff7ed8489 in dxil_spv::CFGNode::retarget_branch (this=0x555555d647f0, to_prev=0x555555d645f0, to_next=0x555555e3b1a0) at /home/cme/git/dxil-spirv/node.cpp:317
#3  0x00007ffff7ed8cc4 in dxil_spv::CFGNode::traverse_dominated_blocks_and_rewrite_branch<dxil_spv::CFGNode::traverse_dominated_blocks_and_rewrite_branch(dxil_spv::CFGNode*, dxil_spv::CFGNode*)::<lambda(const dxil_spv::CFGNode*)> >(const dxil_spv::CFGNode &, dxil_spv::CFGNode *, dxil_spv::CFGNode *, const struct {...} &, dxil_spv::UnorderedSet &) (this=0x555555d647f0, header=..., from=0x555555d645f0, 
    to=0x555555e3b1a0, op=..., visitation_cache=std::unordered_set with 1 element = {...}) at /home/cme/git/dxil-spirv/node.hpp:161
#4  0x00007ffff7ed8bb2 in dxil_spv::CFGNode::traverse_dominated_blocks_and_rewrite_branch<dxil_spv::CFGNode::traverse_dominated_blocks_and_rewrite_branch(dxil_spv::CFGNode*, dxil_spv::CFGNode*)::<lambda(const dxil_spv::CFGNode*)> >(const dxil_spv::CFGNode &, dxil_spv::CFGNode *, dxil_spv::CFGNode *, const struct {...} &) (this=0x555555d647f0, header=..., from=0x555555d645f0, to=0x555555e3b1a0, op=...)
    at /home/cme/git/dxil-spirv/node.hpp:176
#5  0x00007ffff7ed8633 in dxil_spv::CFGNode::traverse_dominated_blocks_and_rewrite_branch (this=0x555555d647f0, from=0x555555d645f0, to=0x555555e3b1a0) at /home/cme/git/dxil-spirv/node.cpp:334
#6  0x00007ffff7eba831 in dxil_spv::CFGStructurizer::split_merge_blocks (this=0x7fffffffb4d0) at /home/cme/git/dxil-spirv/cfg_structurizer.cpp:2372
#7  0x00007ffff7ebb84b in dxil_spv::CFGStructurizer::structurize (this=0x7fffffffb4d0, pass=0) at /home/cme/git/dxil-spirv/cfg_structurizer.cpp:2603
#8  0x00007ffff7eb2f8d in dxil_spv::CFGStructurizer::run (this=0x7fffffffb4d0) at /home/cme/git/dxil-spirv/cfg_structurizer.cpp:315
#9  0x00007ffff7e75f97 in dxil_spv_converter_run (converter=0x555555ae8f50) at /home/cme/git/dxil-spirv/dxil_spirv_c.cpp:458
[#10](/issue/HansKristian-Work/vkd3d-proton/10) 0x000055555557d8d0 in main (argc=2, argv=0x7fffffffddf8) at /home/cme/git/dxil-spirv/dxil_spirv.cpp:759

dxil: 57ab6fc6ce75277d.dxil.gz

HHansKristian-Work maintainer 2021-02-01 github

Fixed on dxil-spirv master, will be updated here eventually. For now you can try submodule update --remote it.

CCME42 2021-02-01 github

I can confirm (both with vkd3d and dxil-spirv standalone) that this crash is fixed.

Nothing extracted yet.