Skip to content

Reminder: investigate why complex test shader crashed D3DCompiler_47.dll #199

Description

@floooh

On Windows run sokol-shdc with:

-i /projects/sokol-tools/test/issue197_complex.glsl -o /scratch/bla.h -l hlsl5 -b

...this crashes D3DCompiler_47.dll without any error messages with a read-segfault somewhere deep in the callstack:

Unhandled exception at 0x00007FFFDD8E7551 (D3DCompiler_47.dll) in sokol-shdc.exe: 0xC0000005: Access violation reading location 0x000002B755E34C1C.

D3DCompiler_47.dll!00007fffdd8e7551() (Unknown Source:0)
D3DCompiler_47.dll!00007fffdd8c16f0() (Unknown Source:0)
D3DCompiler_47.dll!00007fffdd8a6cb8() (Unknown Source:0)
D3DCompiler_47.dll!00007fffdd8a6dbd() (Unknown Source:0)
D3DCompiler_47.dll!00007fffdd8fc6d1() (Unknown Source:0)
D3DCompiler_47.dll!00007fffdd86ea05() (Unknown Source:0)
D3DCompiler_47.dll!00007fffdd87055f() (Unknown Source:0)
D3DCompiler_47.dll!00007fffdd86fc6a() (Unknown Source:0)
D3DCompiler_47.dll!00007fffdd955bb9() (Unknown Source:0)
D3DCompiler_47.dll!00007fffdd955a89() (Unknown Source:0)
D3DCompiler_47.dll!00007fffdd9559ac() (Unknown Source:0)
sokol-shdc.exe!shdc::d3d_compile(const shdc::Input & inp, const shdc::Spirvcross & spirvcross, shdc::Slang::Enum slang) Line 307 (c:\projects\sokol-tools\src\shdc\bytecode.cc:307)
sokol-shdc.exe!shdc::Bytecode::compile(const shdc::Args & args, const shdc::Input & inp, const shdc::Spirvcross & spirvcross, shdc::Slang::Enum slang) Line 353 (c:\projects\sokol-tools\src\shdc\bytecode.cc:353)
sokol-shdc.exe!main(int argc, const char * * argv) Line 100 (c:\projects\sokol-tools\src\shdc\main.cc:100)
sokol-shdc.exe!invoke_main() Line 79 (d:\a\_work\1\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl:79)
sokol-shdc.exe!__scrt_common_main_seh() Line 288 (d:\a\_work\1\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl:288)
sokol-shdc.exe!__scrt_common_main() Line 331 (d:\a\_work\1\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl:331)
sokol-shdc.exe!mainCRTStartup(void * __formal) Line 17 (d:\a\_work\1\s\src\vctools\crt\vcstartup\src\startup\exe_main.cpp:17)
kernel32.dll!00007fffe3c0e8d7() (Unknown Source:0)
ntdll.dll!00007fffe52e8d9c() (Unknown Source:0)

Not sure if there's much that can be done, but maybe SPIRVCross is creating some pathological HLSL5 output.

Activity

  1. self-assigned this
    on Oct 22, 2025
  2. moved this to Parked in sokol todoon Oct 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions