[clang] [llvm] [OffloadBundler] Bound compressed bundles by header size, not magic scan (PR #205587)

via cfe-commits cfe-commits at lists.llvm.org
Thu Jun 25 02:20:23 PDT 2026


michaelselehov wrote:

> Oh I like this! I suppose an alternative solution is to make the Magic String longer (like "**CLANG_OFFLOAD_BUNDLE**" for uncompressed bundles), but using the actual size is definitely more correct. Thanks for also fixing the LLVM API! I don't see any issues with this patch, though maybe an added test for the LLVM API changes to? I think you could just use an existing test in llvm-objcopy for the --offloading option. Look at the tests in https://github.com/llvm/llvm-project/tree/main/llvm/test/tools/llvm-objdump/Offloading

Longer string would help to delay the trigger. You could have delayed it if you've checked that "CCOB" appears at 4k alignment, but it would still remain a latent bomb.
I'll try to work on the API test and come back to you.

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


More information about the cfe-commits mailing list