[Lldb-commits] [PATCH] D28808: Fix a bug where lldb does not respect the packet size.
Hafiz Abid Qadeer via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Wed Jan 18 05:13:38 PST 2017
abidh added inline comments.
================
Comment at: source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp:3999
+ // time, we take a maximum guess here.
+ stub_max_size -= 32 + 32 + 6;
m_max_memory_size = stub_max_size;
----------------
clayborg wrote:
> You need to check "sub_max_size" here. What if it says 64? We will then use a very large unsigned number UINT64_MAX - 6.
Thanks for review. I had a check in my development branch then removed it as the scenario seemed unlikely and there was not a good way to return error from this function. I was inclined to put this check in DoMemoryWrite/read and check the exact size every time but it looks overkill. The check added in this revision probably should be enough.
https://reviews.llvm.org/D28808
More information about the lldb-commits
mailing list