[PATCH] D36262: [ELF] - Do not forget to fill last bytes of PT_LOADs with trap instructions.

George Rimar via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 17 02:13:07 PDT 2017


grimar added inline comments.


================
Comment at: ELF/Writer.cpp:1815
 static void fillTrapInstr(uint8_t *I, uint8_t *End) {
   for (; I + 4 < End; I += 4)
     memcpy(I, &Target->TrapInstr, 4);
----------------
ruiu wrote:
> We can safely assume that End-I is a multiple of 4. So you want to change `<` to `<=` instead of adding a new line of code, no?
Yes. And then what about inlining `fillTrapInstr`?


https://reviews.llvm.org/D36262





More information about the llvm-commits mailing list