<feed xmlns='http://www.w3.org/2005/Atom'>
<title>slang.git/tests/diagnostics/command-line/separate-debug-info-unsupported-target.slang, branch master</title>
<subtitle>Making it easier to work with shaders</subtitle>
<id>https://git.yummers.dev/slang.git/atom?h=master</id>
<link rel='self' href='https://git.yummers.dev/slang.git/atom?h=master'/>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/'/>
<updated>2025-07-22T16:27:05+00:00</updated>
<entry>
<title>Fix segfault when using -separate-debug-info with unsupported targets (#7777)</title>
<updated>2025-07-22T16:27:05+00:00</updated>
<author>
<name>Copilot</name>
<email>198982749+Copilot@users.noreply.github.com</email>
</author>
<published>2025-07-22T16:27:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=6e0c63b723cc81efcc82c2af778b26e507c71825'/>
<id>urn:sha1:6e0c63b723cc81efcc82c2af778b26e507c71825</id>
<content type='text'>
* Initial plan

* Fix segfault when using -separate-debug-info with unsupported targets

Add validation to emit a diagnostic error when -separate-debug-info is used
with targets other than SPIR-V binary. Previously, this would cause a segfault
because the separate debug info logic is only implemented for SPIR-V targets.

Changes:
- Added new diagnostic error (ID 18) for unsupported separate debug info usage
- Added validation in OptionsParser::_parse() to check target compatibility
- Created test cases for HLSL and GLSL targets to verify the fix
- Updated error message to clarify only SPIR-V binary targets are supported

The fix prevents segfaults and provides clear feedback to users about
target limitations for the -separate-debug-info option.

Co-authored-by: csyonghe &lt;2652293+csyonghe@users.noreply.github.com&gt;

* Address feedback: fix segfault properly instead of preventing it

Co-authored-by: csyonghe &lt;2652293+csyonghe@users.noreply.github.com&gt;

---------

Co-authored-by: copilot-swe-agent[bot] &lt;198982749+Copilot@users.noreply.github.com&gt;
Co-authored-by: csyonghe &lt;2652293+csyonghe@users.noreply.github.com&gt;</content>
</entry>
</feed>
