[Lldb-commits] [lldb] [lldb] Skip remote PutFile when MD5 hashes equal (PR #88812)

David Spickett via lldb-commits lldb-commits at lists.llvm.org
Tue Apr 16 02:46:38 PDT 2024


================
@@ -3433,8 +3433,40 @@ bool GDBRemoteCommunicationClient::CalculateMD5(
       return false;
     if (response.Peek() && *response.Peek() == 'x')
       return false;
-    low = response.GetHexMaxU64(false, UINT64_MAX);
-    high = response.GetHexMaxU64(false, UINT64_MAX);
+
+    // GDBRemoteCommunicationServerCommon::Handle_vFile_MD5 concatenates low and
+    // high hex strings. We can't use response.GetHexMaxU64 because that can't
+    // handle the concatenated hex string. What would happen is parsing the low
+    // would consume the whole response packet - which is a bug. Instead, we get
----------------
DavidSpickett wrote:

Maybe a small wording change then "which is a bug" could be "which would give incorrect results".

"is a bug" sounds a lot like we have a bug still.

https://github.com/llvm/llvm-project/pull/88812


More information about the lldb-commits mailing list