[Lldb-commits] [PATCH] D23545: Minidump parsing

Pavel Labath via lldb-commits lldb-commits at lists.llvm.org
Fri Aug 19 06:04:00 PDT 2016


labath added a comment.

Looks good as far as I am concerned. You might want to add a test or two that makes sure we handle invalid data reasonably. E.g., load only the first X kb of the minidump (so that the thread list is not present in the loaded block), and make sure getting a thread list fails (and does not crash).


================
Comment at: source/Plugins/Process/minidump/MinidumpParser.cpp:40
@@ +39,3 @@
+    // check if there is enough data for the parsing of the directory list
+    if ((directory_list_offset + sizeof(MinidumpDirectory) * m_header->streams_count) > m_data_sp->GetByteSize())
+    {
----------------
Please put this before the construction of the ArrayRef - so we don't create a dangling object for no reason.


https://reviews.llvm.org/D23545





More information about the lldb-commits mailing list