Arch Linux

Please read this before reporting a bug:

Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!

FS#77394 - [directx-shader-compiler] Compiling simple shaders causes assertion failure

Attached to Project: Arch Linux
Opened by Krzysztof Bogacki (Saancreed) - Sunday, 05 February 2023, 02:08 GMT
Last edited by Toolybird (Toolybird) - Monday, 06 February 2023, 05:51 GMT
Task Type Bug Report
Category Packages: Extra
Status Assigned
Assigned To Laurent Carlier (lordheavy)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 0%
Votes 0
Private No



Attempting to compile simple HLSL shaders to DXIL with dxc from Arch repo causes an assertion failure and results in a core dump. Binaries provided by Microsoft successfully compile the same shaders.

Additional info:
* package version(s): directx-shader-compiler=1.7.2212-1
* config and/or log files: see below

Steps to reproduce:

$ curl -Lso ./shaders.hlsl ''
$ dxc -E VSMain -T vs_6_0 -Fo ./vs.dxil ./shaders.hlsl; echo $?; file ./vs.dxil


dxc: /build/directx-shader-compiler/src/directx-shader-compiler-1.7.2212/lib/IR/User.cpp:44: void llvm::User::allocHungoffUses(unsigned int, bool): Assertion `HasHungOffUses && "alloc must have hung off uses"' failed.
Aborted (core dumped)
./vs.dxil: cannot open './vs.dxil' (No such file or directory)

Expected result (including reproduction steps):

$ curl -Ls '' | bsdtar xf -
$ chmod +x ./bin/x64/dxc
$ LD_LIBRARY_PATH=~+/lib/x64 ./bin/x64/dxc -E VSMain -T vs_6_0 -Fo ./vs.dxil ./shaders.hlsl; echo $?; file ./vs.dxil
warning: DXIL.dll not found. Resulting DXIL will not be signed for use in release environments.

./vs.dxil: data
This task depends upon

Comment by Toolybird (Toolybird) - Sunday, 05 February 2023, 07:05 GMT
> results in a core dump

Does a backtrace produce anything useful [1]?

Comment by Krzysztof Bogacki (Saancreed) - Sunday, 05 February 2023, 12:54 GMT
> Does a backtrace produce anything useful?

Unfortunately no, `debuginfod-find debuginfo /usr/lib/` gives me `Server query failed: No such file or directory` and there is no `directx-shader-compiler-debug` package in `extra-debug` repository, so all I can see for the `` part of the stack trace is `??` and `No symbol table info available.`. Attached is the full output of gdb's `bt full`.
   bt.txt (4.2 KiB)