[PATCH] D36262: [ELF] - Do not forget to fill last bytes of PT_LOADs with trap instructions.
Rui Ueyama via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Aug 16 15:50:37 PDT 2017
ruiu 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);
----------------
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?
https://reviews.llvm.org/D36262
More information about the llvm-commits
mailing list