[lld] Fix lld crash wrt generated thunks growing away from the patched code (PR #170495)

Peter Smith via llvm-commits llvm-commits at lists.llvm.org
Wed Dec 3 08:56:21 PST 2025


================
@@ -410,13 +418,12 @@ void Patch843419Section::writeTo(uint8_t *buf) {
   // patchee Section.
   write32le(buf, read32le(patchee->content().begin() + patcheeOffset));
 
-  // Apply any relocation transferred from the original patchee section.
-  ctx.target->relocateAlloc(*this, buf);
+  // Note: The jump back was configured in this classe's constructor, and
----------------
smithp35 wrote:

I don't think you need the comment here as well as in the constructor. If you do want to keep it there's a typo in `classe's`. Should be `class's`. 

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


More information about the llvm-commits mailing list