[PATCH] [02/10] ELF/AArch64: Add support for checking PREL32 for overflow
Rui Ueyama
ruiu at google.com
Tue Apr 7 09:21:30 PDT 2015
LGTM
================
Comment at: lib/ReaderWriter/ELF/AArch64/AArch64RelocationHandler.cpp:77
@@ +76,3 @@
+ if (!withinSignedUnsignedRange(result, 32))
+ return make_out_of_range_reloc_error();
+ write32le(location, result + read32le(location));
----------------
withinSignedUnsignedRange's definition looks strange to me, so I checked the spec and confirmed that what the function is doing is correct. Can you add a one line note to the function comment for readers like me saying that this is what the spec actually requires?
http://reviews.llvm.org/D8861
EMAIL PREFERENCES
http://reviews.llvm.org/settings/panel/emailpreferences/
More information about the llvm-commits
mailing list