From 369149622268fa194fc43e15b4f6889db15949c6 Mon Sep 17 00:00:00 2001 From: Rene Gollent Date: Tue, 10 Jul 2012 22:06:01 -0400 Subject: [PATCH] Fix #8709. - The buffer that the debugger used to retrieve messages from the debug port was slightly too small for the largest of the message data structs (currently 1100 bytes), causing some types of debug events to get truncated. This resulted in image creation/deletion events being received with a truncated image_info struct, which would result in several fields being returned with random values, most notably the text/data base and size fields. Consequently, searching those images for an address within them would fail, leading to #8709. It's possible but not yet confirmed that this bug is also responsible for #8710, need to test further. --- src/apps/debugger/debugger_interface/DebuggerInterface.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/apps/debugger/debugger_interface/DebuggerInterface.cpp b/src/apps/debugger/debugger_interface/DebuggerInterface.cpp index c98ca870d0..a1c9a05d62 100644 --- a/src/apps/debugger/debugger_interface/DebuggerInterface.cpp +++ b/src/apps/debugger/debugger_interface/DebuggerInterface.cpp @@ -312,7 +312,7 @@ status_t DebuggerInterface::GetNextDebugEvent(DebugEvent*& _event) { while (true) { - char buffer[1024]; + char buffer[2048]; int32 messageCode; ssize_t size = read_port(fDebuggerPort, &messageCode, buffer, sizeof(buffer)); @@ -324,7 +324,7 @@ DebuggerInterface::GetNextDebugEvent(DebugEvent*& _event) } if (messageCode <= B_DEBUGGER_MESSAGE_HANDED_OVER) { - debug_debugger_message_data message; + debug_debugger_message_data message; memcpy(&message, buffer, size); if (message.origin.team != fTeamID) continue;