<table border="1" cellspacing="0" cellpadding="8">
    <tr>
        <th>Issue</th>
        <td>
            <a href=https://github.com/llvm/llvm-project/issues/128598>128598</a>
        </td>
    </tr>

    <tr>
        <th>Summary</th>
        <td>
            DirectX codegen tests failing when ran under hwasan
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            new issue
      </td>
    </tr>

    <tr>
      <th>Assignees</th>
      <td>
      </td>
    </tr>

    <tr>
      <th>Reporter</th>
      <td>
          Icohedron
      </td>
    </tr>
</table>

<pre>
    After the merging of a PR (#128556) fix to DirectX build breaks, 28 DirectX tests are failing when ran under my hwasan build of this PR's branch.
See this log: https://gist.github.com/Icohedron/54739cbd0ab952d666bf376e76c9bb85

Similar to issue #124045, it appears to be related to the use of `-o /dev/null` with `llc`
```
/workspace/llvm-project/build/bin/llc /workspace/llvm-project/llvm/test/CodeGen/DirectX/BufferStore-errors.ll -o /dev/null 2>&1
error: <unknown>:0:0: in function storetoomany void (<5 x float>, i32): typedBufferStore data must be a vector of 4 elements

error: <unknown>:0:0: in function storetoofew void (<3 x i32>, i32): typedBufferStore data must be a vector of 4 elements

pure virtual method called
terminate called without an active exception
Aborted
```
Replacing `-o /dev/null` with `-o -` makes the tests pass.

This is odd because @vitalybuka supposedly patched a similar issue w.r.t. a SPIRV codegen error test (see https://github.com/llvm/llvm-project/pull/125599#discussion_r1966650839 )
 
</pre>
<img width="1" height="1" alt="" src="http://email.email.llvm.org/o/eJysVNFu6zYM_RrlhaihULYTP_ght3ce7lvRDsPeBlmiY62yZEhy0vz9IDu9Kzpsw4YBCQKFEnkOzyFljObsiFpWfWHV151c0uhD-035kXTwbtd7fWtPQ6IAaSSYKJyNO4MfQMLTMzA8MhR7PFZVzbCBwbxB8vDVBFLpF-gXYzX0geRrZPgIePweShRTBBkIBmlsznkdyUGQDhanKcB0g_Eqo3T3LH6ANJoIT88MDxH6IJ0aC8a_Mn56IdqC1p-ZOMGY0hyZODHsGHZnE1NxNmlc-kL5iWH3nR_DrioPolG95r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