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

via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 16 03:25:27 PDT 2026


https://github.com/311Volt created https://github.com/llvm/llvm-project/pull/210024

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.

>From c106d5563240fb084fbf329e98cbe0a27d4ee715 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jan=20Trusi=C5=82=C5=82o?= <jan.trusillo at intel.com>
Date: Thu, 16 Jul 2026 10:16:14 +0000
Subject: [PATCH] [offload] fix failure of olCreateProgramTest.TruncatedBinary

---
 offload/unittests/OffloadAPI/program/olCreateProgram.cpp | 2 ++
 1 file changed, 2 insertions(+)

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);



More information about the llvm-commits mailing list