1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-23 11:13:28 +01:00

llvm-readobj: relocAddressLess could potentially lie

On error conditions, relocAddressLess might claim that a value is less
than itself.  Instead, abort llvm-readobj.  No functionality change
intended.

llvm-svn: 221872
This commit is contained in:
David Majnemer 2014-11-13 07:54:05 +00:00
parent 0c18289151
commit 4c60a9e21b

View File

@ -168,8 +168,8 @@ bool error(std::error_code EC) {
bool relocAddressLess(RelocationRef a, RelocationRef b) {
uint64_t a_addr, b_addr;
if (error(a.getOffset(a_addr))) return false;
if (error(b.getOffset(b_addr))) return false;
if (error(a.getOffset(a_addr))) exit(ReturnValue);
if (error(b.getOffset(b_addr))) exit(ReturnValue);
return a_addr < b_addr;
}