microsoft / microsoft/DirectXShaderCompiler
Fix UBSAN alignment failures
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 3.7k
- Forks
- 900
- Avg merge
- 2d 11h
- Merged PRs (30d)
- 44
Description
In this PR, UBSAN's alignment sanitizer is disabled.
I attempted to address these with a short-term fix (see this commit and this Godbolt code), but unfortunately, the code that makes use of the CheckedReaderWriter, such as in DxilPipelineStateValidation::ReadOrWrite, was just becoming too gnarly and difficult to read. @llvm-beanz has reimplemented this code in upstream Clang properly, and perhaps at some point, we can back-port that code into DXC.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing PR 5803, the CheckedReaderWriter usage in DxilPipelineStateValidation::ReadOrWrite, and the linked upstream Clang reimplementation. Determine whether that implementation can be back-ported into DXC; done means UBSAN alignment sanitization can be enabled without the reported failures.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- compilers
- Issue type
- Bug
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100