[Lldb-commits] [PATCH] D31485: Verify memory address range validity in GDBRemoteCommunicationClient

Greg Clayton via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Thu Mar 30 14:19:40 PDT 2017

clayborg requested changes to this revision.
clayborg added a comment.
This revision now requires changes to proceed.

Simple logic change so we don't check the range validity more than once.

Comment at: source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp:1506-1510
+      // We got an invalid address range back
+      if (!region_info.GetRange().IsValid()) {
+        error.SetErrorString("Server returned invalid range");
+      }
Logic is fine, but I would work this into the if statement below. Something like:

if (region_info.GetRange().IsValid()) {
  if (!saw_permissions) {
} else {
  // We got an invalid address range back
  error.SetErrorString("Server returned invalid range");


More information about the lldb-commits mailing list