[llvm] Add --dump-offload-bundle option to llvm-objcopy (PR #143347)
James Henderson via llvm-commits
llvm-commits at lists.llvm.org
Fri Sep 19 01:05:44 PDT 2025
================
@@ -211,12 +211,23 @@ Error object::extractCodeObject(const ObjectFile &Source, int64_t Offset,
if (Error Err = InputBuffOrErr.takeError())
return Err;
+ if (Size > InputBuffOrErr->getBufferSize())
+ return createStringError(inconvertibleErrorCode(),
+ "size in URI is larger than source");
----------------
jh7370 wrote:
The LLVM style guide says that error messages should include additional relevant context. In this case, it could be something like the source size. Similar comments apply below.
https://github.com/llvm/llvm-project/pull/143347
More information about the llvm-commits
mailing list