lemo added a comment. Shouldn't we also handle the general case where raw size < virtual size? (which would naturally subsume this fix)
================ Comment at: lldb/source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.cpp:1073 + + if (section_offset >= section->GetByteSize()) + return 0; ---------------- shouldn't this be a hard error instead of returning 0? ================ Comment at: lldb/source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.cpp:1077 + size_t bytes_avail = section->GetByteSize() - section_offset; + size_t read_size = std::min(dst_len, bytes_avail); + ::memset(dst, 0, read_size); ---------------- do we really need to return the available "bytes" if the full read size can't be fullfiled? (ie. shouldn't that be a hard error instead?) https://reviews.llvm.org/D54241 _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits