-
-
Notifications
You must be signed in to change notification settings - Fork 111
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
D3D12CreateDevice call fails with hr 0x887A0004 on WSL2 #470
Comments
Can you try with |
Doesn't help:
|
Thanks for testing! If you look in the coverage report for the actual D3D12CreateDevice, can you see what goes wrong there? Traditionally, failures have typically been because the DWARF debug info is incorrect, causing breakpoints to be set in the middle of an instruction and making it invalid, hence the I guess |
--skip-solibs does make a difference and now it works for me. But that will not really fix the issue, the code is now not covered at all. I cannot look at DXCore libraries as I don't have the source code, they come with the OS and are directly provided by microsoft. |
After poking around in kcov source code, it seems that the issue is the overloading of dlopen.
or alternatively completely disabling the dlopen overload, then everything works fine. If I use --skip-solibs the code works but I get nothing in the coverage. One other thing I found, it seems that the problems will is with calling getenv() and calling force_breakpoint. If both are removed then the code works fine. Seems like the little hack to write and pre-load a library and use LD_PRELOAD doesn't play well with Direct3D, I don't know why, but for now I can properly use kcov on my test cases. Maybe you can add an option like --skip-solibds to not use dlopen but not disable everything. |
If you build with -fno-pie, and use --skip-solibs, do you get coverage for your tests? I've done that when using ASAN, which also doesn't play well with the shared library support (but I think that's due to LD_PRELOAD). Otherwise your suggestion sounds good, although it might not be completely obvious when you need to use it. |
Code works properly when not running under kcov.
Other calls to DXCore seem to work properly.
Repro steps:
clone https://github.com/microsoft/DirectX-Headers.git
edit test/test.cpp
modify last line to be:
run he following commands:
Normal run of test/DirectX-Headers-Test doesn't show any error, kcov run shows error:
Failed to create D3D12 device hr = 887a0004
The resulting coverage output will also show that the
return 0;
line is not hit.The text was updated successfully, but these errors were encountered: