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

[SPIR-V] Embedding debug info from shader source with non Latin letters causes exception #6948

Open
LawG4 opened this issue Oct 5, 2024 · 0 comments
Labels
bug Bug, regression, crash needs-triage Awaiting triage spirv Work related to SPIR-V

Comments

@LawG4
Copy link

LawG4 commented Oct 5, 2024

Description
Attempting to generate spirv byte code with debug information inside the binary crashes when the input file path contains non-latin text. Resulting in an internal compiler error to be reported. Except when specifying vulkan-with-source

Steps to Reproduce

# Crash
dxc.exe hlsl_頂点.hlsl -spirv -T vs_6_0 -Qembed_debug -Zi

# No Crash, no spirv flag set
dxc.exe hlsl_頂点.hlsl -T vs_6_0 -Qembed_debug -Zi

# Crash 
dxc.exe hlsl_頂点.hlsl -spirv -T vs_6_0 -fspv-debug=file
dxc.exe hlsl_頂点.hlsl -spirv -T vs_6_0 -fspv-debug=line
dxc.exe hlsl_頂点.hlsl -spirv -T vs_6_0 -fspv-debug=source

# Interestingly,  this results in *no* crash 
dxc.exe hlsl_頂点.hlsl -spirv -T vs_6_0 -fspv-debug=vulkan-with-source

Source code inside the hlsl file is a simple text shader which just passes information to next stage

struct VS_OUTPUT {
    float4 pos : POSITION;
};

struct VS_INPUT {
    float4 pos : POSITION;
};

VS_OUTPUT main(const VS_INPUT vs_input) {
    VS_OUTPUT vs_out;
    vs_out.pos = vs_input.pos;
    return vs_out;
}

Actual Behavior
The compiler only outputs this text on the runs which crash

Internal compiler error: access violation. Attempted to read from address 0x00000000000000A8

Environment

  • DXC version: dxcompiler.dll: 1.8 - 1.8.2407.7 (416fab6); dxil.dll: 1.8(101.8.2407.12)
  • Host Operating System: Windows 10
@LawG4 LawG4 added bug Bug, regression, crash needs-triage Awaiting triage spirv Work related to SPIR-V labels Oct 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Bug, regression, crash needs-triage Awaiting triage spirv Work related to SPIR-V
Projects
Status: For Google
Development

No branches or pull requests

1 participant