[llvm] [offload] fix failure of olCreateProgramTest.TruncatedBinary (PR #210024)

via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 16 03:26:06 PDT 2026


llvmorg-github-actions[bot] wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-offload

Author: 311Volt

<details>
<summary>Changes</summary>

https://github.com/llvm/llvm-project/pull/207208 caused a CI failure on openmp-offload-amdgpu-clang-flang in the olCreateProgramTest.TruncatedBinary test. HSA reads the binary size from the header, reading the truncated buffer past the end, causing a SIGSEGV.

This PR adds a skip to this test on AMDGPU, as truncated binary validation is not guaranteed with that plugin.

---
Full diff: https://github.com/llvm/llvm-project/pull/210024.diff


1 Files Affected:

- (modified) offload/unittests/OffloadAPI/program/olCreateProgram.cpp (+2) 


``````````diff
diff --git a/offload/unittests/OffloadAPI/program/olCreateProgram.cpp b/offload/unittests/OffloadAPI/program/olCreateProgram.cpp
index 4f661cf4b4cd0..f3fe9d0bfbee9 100644
--- a/offload/unittests/OffloadAPI/program/olCreateProgram.cpp
+++ b/offload/unittests/OffloadAPI/program/olCreateProgram.cpp
@@ -86,6 +86,8 @@ TEST_P(olCreateProgramTest, InvalidBinary) {
 }
 
 TEST_P(olCreateProgramTest, TruncatedBinary) {
+  SKIP_KNOWN_FAILURE(AMDGPU{"HSA reads past end of buffer, causing a crash"});
+
   std::unique_ptr<llvm::MemoryBuffer> DeviceBin;
   ASSERT_TRUE(TestEnvironment::loadDeviceBinary("foo", Device, DeviceBin));
   ASSERT_GT(DeviceBin->getBufferSize(), 1lu);

``````````

</details>


https://github.com/llvm/llvm-project/pull/210024


More information about the llvm-commits mailing list