[all-commits] [llvm/llvm-project] 68db51: [Object] Fix the return type of getOffset/getSize
Alexander Shaposhnikov via All-commits
all-commits at lists.llvm.org
Thu Oct 17 11:46:55 PDT 2019
Branch: refs/heads/master
Home: https://github.com/llvm/llvm-project
Commit: 68db51d5c677239fe5ca286f068909479deb75c7
https://github.com/llvm/llvm-project/commit/68db51d5c677239fe5ca286f068909479deb75c7
Author: Alexander Shaposhnikov <shal1t712 at gmail.com>
Date: 2019-10-17 (Thu, 17 Oct 2019)
Changed paths:
M llvm/include/llvm/Object/MachOUniversal.h
Log Message:
-----------
[Object] Fix the return type of getOffset/getSize
Header64.offset/Header64.size are uint64_t, thus we should not
truncate them to unit32_t. Moreover, there are a number of places
where we sum the offset and the size (e.g. in various checks in MachOUniversal.cpp),
the truncation causes issues since the offset/size can perfectly fit into uint32_t,
while the sum overflows.
Differential revision: https://reviews.llvm.org/D69126
Test plan: make check-all
llvm-svn: 375154
More information about the All-commits
mailing list