Skip to content

Conversation

david-salinas
Copy link
Contributor

Fix or the failing Sanitizer buildbots from PR: #143342

@llvmbot
Copy link
Member

llvmbot commented Sep 30, 2025

@llvm/pr-subscribers-llvm-binary-utilities

Author: David Salinas (david-salinas)

Changes

Fix or the failing Sanitizer buildbots from PR: #143342


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

1 Files Affected:

  • (modified) llvm/lib/Object/OffloadBundle.cpp (+2-2)
diff --git a/llvm/lib/Object/OffloadBundle.cpp b/llvm/lib/Object/OffloadBundle.cpp
index 0dd378e65fd81..7c84e9b92032d 100644
--- a/llvm/lib/Object/OffloadBundle.cpp
+++ b/llvm/lib/Object/OffloadBundle.cpp
@@ -120,14 +120,14 @@ OffloadBundleFatBin::create(MemoryBufferRef Buf, uint64_t SectionOffset,
   if (identify_magic(Buf.getBuffer()) != file_magic::offload_bundle)
     return errorCodeToError(object_error::parse_failed);
 
-  OffloadBundleFatBin *TheBundle = new OffloadBundleFatBin(Buf, FileName);
+  std::unique_ptr<OffloadBundleFatBin> TheBundle(new OffloadBundleFatBin(Buf, FileName));
 
   // Read the Bundle Entries
   Error Err = TheBundle->readEntries(Buf.getBuffer(), SectionOffset);
   if (Err)
     return Err;
 
-  return std::unique_ptr<OffloadBundleFatBin>(TheBundle);
+  return TheBundle;
 }
 
 Error OffloadBundleFatBin::extractBundle(const ObjectFile &Source) {

Copy link

github-actions bot commented Sep 30, 2025

✅ With the latest revision this PR passed the C/C++ code formatter.

Copy link
Contributor

@lamb-j lamb-j left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm, can you add the clang-format suggestion?

@david-salinas
Copy link
Contributor Author

lgtm, can you add the clang-format suggestion?

ok latest patch addresses the clang-format failures

@david-salinas david-salinas merged commit b80b48d into llvm:main Sep 30, 2025
9 checks passed
@llvm-ci
Copy link
Collaborator

llvm-ci commented Sep 30, 2025

LLVM Buildbot has detected a new failure on builder mlir-nvidia-gcc7 running on mlir-nvidia while building llvm at step 6 "build-check-mlir-build-only".

Full details are available at: https://lab.llvm.org/buildbot/#/builders/116/builds/19080

Here is the relevant piece of the build log for the reference
Step 6 (build-check-mlir-build-only) failure: build (failure)
...
16.527 [1911/16/3073] Building TestOps.2.cpp...
16.532 [1910/16/3074] Building TestOps.5.cpp...
16.533 [1909/16/3075] Building TestOps.19.cpp...
16.533 [1908/16/3076] Building TestOps.6.cpp...
16.534 [1907/16/3077] Building TestOps.9.cpp...
16.541 [1906/16/3078] Building TestOps.20.cpp...
16.543 [1905/16/3079] Building TestOps.8.cpp...
16.545 [1904/16/3080] Building TestOps.7.cpp...
16.569 [1903/16/3081] Building dialects/_bufferization_enum_gen.py...
16.587 [1902/16/3082] Building CXX object lib/Object/CMakeFiles/LLVMObject.dir/OffloadBundle.cpp.o
FAILED: lib/Object/CMakeFiles/LLVMObject.dir/OffloadBundle.cpp.o 
CCACHE_CPP2=yes CCACHE_HASHDIR=yes CCACHE_SLOPPINESS=pch_defines,time_macros /usr/bin/ccache /usr/bin/g++-7 -DGTEST_HAS_RTTI=0 -D_DEBUG -D_GLIBCXX_ASSERTIONS -D_GLIBCXX_USE_CXX11_ABI=1 -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -I/vol/worker/mlir-nvidia/mlir-nvidia-gcc7/llvm.obj/lib/Object -I/vol/worker/mlir-nvidia/mlir-nvidia-gcc7/llvm.src/llvm/lib/Object -I/vol/worker/mlir-nvidia/mlir-nvidia-gcc7/llvm.obj/include -I/vol/worker/mlir-nvidia/mlir-nvidia-gcc7/llvm.src/llvm/include -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wno-missing-field-initializers -pedantic -Wno-long-long -Wimplicit-fallthrough -Wno-uninitialized -Wno-nonnull -Wno-array-bounds -Wno-noexcept-type -Wdelete-non-virtual-dtor -Wno-comment -Wno-misleading-indentation -fdiagnostics-color -ffunction-sections -fdata-sections -O3 -DNDEBUG  -fno-exceptions -funwind-tables -fno-rtti -UNDEBUG -std=c++1z -MD -MT lib/Object/CMakeFiles/LLVMObject.dir/OffloadBundle.cpp.o -MF lib/Object/CMakeFiles/LLVMObject.dir/OffloadBundle.cpp.o.d -o lib/Object/CMakeFiles/LLVMObject.dir/OffloadBundle.cpp.o -c /vol/worker/mlir-nvidia/mlir-nvidia-gcc7/llvm.src/llvm/lib/Object/OffloadBundle.cpp
/vol/worker/mlir-nvidia/mlir-nvidia-gcc7/llvm.src/llvm/lib/Object/OffloadBundle.cpp: In static member function ‘static llvm::Expected<std::unique_ptr<llvm::object::OffloadBundleFatBin> > llvm::object::OffloadBundleFatBin::create(llvm::MemoryBufferRef, uint64_t, llvm::StringRef)’:
/vol/worker/mlir-nvidia/mlir-nvidia-gcc7/llvm.src/llvm/lib/Object/OffloadBundle.cpp:131:10: error: could not convert ‘TheBundle’ from ‘std::unique_ptr<llvm::object::OffloadBundleFatBin>’ to ‘llvm::Expected<std::unique_ptr<llvm::object::OffloadBundleFatBin> >’
   return TheBundle;
          ^~~~~~~~~
16.589 [1902/15/3083] Linking CXX static library lib/libMLIRPythonTestDialect.a
16.592 [1902/14/3084] Building dialects/_index_enum_gen.py...
16.594 [1902/13/3085] Building dialects/_builtin_ops_gen.py...
16.599 [1902/12/3086] Building dialects/_index_ops_gen.py...
16.601 [1902/11/3087] Linking CXX executable bin/mlir-linalg-ods-yaml-gen
16.601 [1902/10/3088] Building dialects/_complex_ops_gen.py...
16.613 [1902/9/3089] Building dialects/_cf_ops_gen.py...
16.625 [1902/8/3090] Linking CXX executable tools/mlir/unittests/Bytecode/MLIRBytecodeTests
16.629 [1902/7/3091] Building CXX object lib/Object/CMakeFiles/LLVMObject.dir/IRSymtab.cpp.o
16.699 [1902/6/3092] Building TestOps.h.inc...
16.748 [1902/5/3093] Building TestOps.cpp.inc...
19.794 [1902/4/3094] Building X86GenInstrInfo.inc...
20.867 [1902/3/3095] Building X86GenSubtargetInfo.inc...
21.084 [1902/2/3096] Building CXX object lib/MC/MCParser/CMakeFiles/LLVMMCParser.dir/AsmParser.cpp.o
31.042 [1902/1/3097] Building CXX object lib/CodeGen/AsmPrinter/CMakeFiles/LLVMAsmPrinter.dir/AsmPrinter.cpp.o
ninja: build stopped: subcommand failed.

@Kewen12
Copy link
Contributor

Kewen12 commented Sep 30, 2025

Hello, This PR appears to break our bot due to a build error. Could you please fix it. Thanks!

home/botworker/bbot/builds/openmp-offload-sles-build/llvm.src/llvm/lib/Object/OffloadBundle.cpp:131:10: error: could not convert ‘TheBundle’ from ‘std::unique_ptrllvm::object::OffloadBundleFatBin’ to ‘llvm::Expected<std::unique_ptrllvm::object::OffloadBundleFatBin >’
return TheBundle;

bot: https://lab.llvm.org/buildbot/#/builders/140/builds/31640

ronlieb added a commit that referenced this pull request Oct 1, 2025
ronlieb added a commit that referenced this pull request Oct 1, 2025
llvm-sync bot pushed a commit to arm/arm-toolchain that referenced this pull request Oct 1, 2025
mahesh-attarde pushed a commit to mahesh-attarde/llvm-project that referenced this pull request Oct 3, 2025
Fix or the failing Sanitizer buildbots from PR:
llvm#143342
mahesh-attarde pushed a commit to mahesh-attarde/llvm-project that referenced this pull request Oct 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants