JDevlieghere marked 2 inline comments as done.
JDevlieghere added inline comments.


================
Comment at: 
lldb/source/Plugins/ObjectContainer/Universal-Mach-O/ObjectContainerUniversalMachO.cpp:205
+        const lldb::offset_t slice_file_offset =
+            fat_arch.GetOffset() + file_offset;
+        if (fat_arch.GetOffset() < file_size && file_size > slice_file_offset) 
{
----------------
JDevlieghere wrote:
> aprantl wrote:
> > Should this use AddOverflow?
> > https://llvm.org/doxygen/MathExtras_8h.html
> Yes, but nothing in `ObjectContainerUniversalMachO` is currently overflow 
> aware. I'll fix up the whole file in a follow-up. 
Actually, it looks like `AddOverflow` only checks for signed overflow 
(`std::enable_if_t< std::is_signed< T >::value, T >`). I assumed it was going 
through APInt under the hood. I think that's probably overkill here. 


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D147012/new/

https://reviews.llvm.org/D147012

_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to