Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exception when compiling shaders with the Release version built from source #6916

Open
GlassBeaver opened this issue Sep 13, 2024 · 2 comments
Labels
bug Bug, regression, crash
Milestone

Comments

@GlassBeaver
Copy link

Description
Compiling shaders with DXC built from source in the Release configuration from commit 05334a7 produces an exception.
The Debug configuration works fine.

Steps to Reproduce
Build DXC from source from commit 05334a7 in the Release configuration and try & compile any shader with it via the exe.

Actual Behavior

Exception thrown at 0x00007FFDD9302E20 (msvcp140.dll) in dxc.exe: 0xC0000005: Access violation reading location 0x0000000000000000.

Stack trace:

msvcp140.dll!00007ffdd9302e20()    Unknown
>    [Inline Frame] dxcompiler.dll!std::_Mutex_base::lock() Line 52    C++
     [Inline Frame] dxcompiler.dll!std::lock_guard<std::recursive_mutex>::{ctor}(std::recursive_mutex &) Line 454    C++
     dxcompiler.dll!llvm::ManagedStaticBase::RegisterManagedStatic(void *(*)() Creator, void(*)(void *) Deleter) Line 45    C++
     [Inline Frame] dxcompiler.dll!llvm::ManagedStatic<llvm::PassRegistry,llvm::object_creator<llvm::PassRegistry>,llvm::object_deleter<llvm::PassRegistry>>::operator*() Line 103    C++
     dxcompiler.dll!llvm::PassRegistry::getPassRegistry() Line 57    C++
     dxcompiler.dll!hlsl::SetupRegistryPassForHLSL() Line 8    C++
     [Inline Frame] dxcompiler.dll!InitMaybeFail() Line 66    C++
     dxcompiler.dll!DllMain(HINSTANCE__ * hinstDLL, unsigned long Reason, void * reserved) Line 104    C++
     dxcompiler.dll!dllmain_dispatch(HINSTANCE__ * const instance, const unsigned long reason, void * const reserved) Line 281    C++
     ntdll.dll!00007ffdf57d8b7f()    Unknown
     ntdll.dll!00007ffdf581d51d()    Unknown
     ntdll.dll!00007ffdf581d2ce()    Unknown
     ntdll.dll!00007ffdf57ddb0d()    Unknown
     ntdll.dll!00007ffdf57d8e20()    Unknown
     ntdll.dll!00007ffdf57c90ac()    Unknown
     ntdll.dll!00007ffdf57da73a()    Unknown
     KernelBase.dll!00007ffdf2dcb412()    Unknown
     KernelBase.dll!00007ffdf2dc74b1()    Unknown
     KernelBase.dll!00007ffdf2e21acf()    Unknown
     [Inline Frame] dxc.exe!dxc::DxcDllSupport::InitializeInternal(const char *) Line 34    C++
     [Inline Frame] dxc.exe!dxc::DxcDllSupport::Initialize() Line 91    C++
     dxc.exe!dxc::EnsureEnabled(dxc::DxcDllSupport & dxcSupport) Line 78    C++
     dxc.exe!dxc::main(int argc, const wchar_t * * argv_) Line 1465    C++
     [Inline Frame] dxc.exe!invoke_main() Line 90    C++
     dxc.exe!__scrt_common_main_seh() Line 288    C++
     kernel32.dll!00007ffdf429257d()    Unknown
     ntdll.dll!00007ffdf580af28()    Unknown

Environment

  • DXC version 1.8 - 1.8.0.14730 (main, 05334a7); dxil.dll: 1.8(1.8.0.14730)
  • Host Operating System Windows 11 23H2 OS Build 22631.4169
@GlassBeaver GlassBeaver added bug Bug, regression, crash needs-triage Awaiting triage labels Sep 13, 2024
@damyanp damyanp removed the needs-triage Awaiting triage label Sep 17, 2024
@damyanp damyanp added this to the Dormant milestone Sep 17, 2024
@damyanp
Copy link
Member

damyanp commented Sep 17, 2024

This seems likely caused by https://learn.microsoft.com/en-us/cpp/porting/binary-compat-2015-2017?view=msvc-170.

I'll keep this issue open and in dormant for now, but if you find this does resolve things for you can you let us know please? Thanks!

@GlassBeaver
Copy link
Author

Hi, Thanks for the link but I'll have to admit I'm not sure what I should be looking for - I'm compiling everything with the same version of VS2022, MSVC, Win 11 and Windows SDK.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Bug, regression, crash
Projects
Status: Triaged
Development

No branches or pull requests

2 participants