Skip to content

Revert "Fix setting root descriptor table"#7

Merged
llvm-beanz merged 1 commit into
mainfrom
revert-4-dsets
Dec 6, 2024
Merged

Revert "Fix setting root descriptor table"#7
llvm-beanz merged 1 commit into
mainfrom
revert-4-dsets

Conversation

@llvm-beanz

Copy link
Copy Markdown
Collaborator

Reverts #4

I clearly have something wrong with the pre-merge check because it missed this failing on Vulkan. I'll look into that but in the meantime I'm going to revert to green.

@llvm-beanz llvm-beanz merged commit 7c112fa into main Dec 6, 2024
@llvm-beanz llvm-beanz deleted the revert-4-dsets branch December 18, 2024 21:27
Icohedron added a commit that referenced this pull request Apr 23, 2026
…e.so (#1107)

In Windows Subsystem for Linux, libd3d12.so is a shim that dlopen's
libd3d12core.so and uses dlsym to resolve D3D12GetInterface. Due to ELF
symbol interposition, dlsym may resolve back to libd3d12.so's own
export, causing infinite recursion and a stack overflow.

Example:
```
❯ ./api-query
PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace and instructions to reproduce the bug.
Stack dump:
0.      Program arguments: ./api-query
  #0 0x00005555556e960b llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) /home/icohedron/hlsl-dev/llvm-project/llvm/lib/Support/Unix/Signals.inc:880:13
  #1 0x00005555556e70f5 llvm::sys::RunSignalHandlers() /home/icohedron/hlsl-dev/llvm-project/llvm/lib/Support/Signals.cpp:109:18
  #2 0x00005555556ea45a SignalHandler(int, siginfo_t*, void*) /home/icohedron/hlsl-dev/llvm-project/llvm/lib/Support/Unix/Signals.inc:448:38
  #3 0x00007ffff7442790 __restore_rt (/nix/store/jms7zxzm7w1whczwny5m3gkgdjghmi2r-glibc-2.42-51/lib/libc.so.6+0x42790)
  #4 0x00007ffff7df4a21 (/usr/lib/wsl/lib/libd3d12.so+0xb7a21)
  #5 0x00007ffff7df6b6a (/usr/lib/wsl/lib/libd3d12.so+0xb9b6a)
  #6 0x00007ffff7df8ac6 D3D12GetInterface (/usr/lib/wsl/lib/libd3d12.so+0xbbac6)
  #7 0x00007ffff7df8adf D3D12GetInterface (/usr/lib/wsl/lib/libd3d12.so+0xbbadf)
...
#254 0x00007ffff7df8adf D3D12GetInterface (/usr/lib/wsl/lib/libd3d12.so+0xbbadf)
#255 0x00007ffff7df8adf D3D12GetInterface (/usr/lib/wsl/lib/libd3d12.so+0xbbadf)
Failed to query D3D info queue
Segmentation fault         (core dumped) ./api-query
```

This PR fixes the issue by explicitly linking libd3d12core.so before
libd3d12.so so it appears first in the global symbol table.

Assisted-by: Claude Opus 4.6
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant