From: Markus Metzger Date: Tue, 10 Mar 2026 05:44:18 +0000 (+0000) Subject: gdb, remote: fix notify debug nullptr dereference X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=cd52261cfb4d146b30e3a0ce456a582980f5b11b;p=thirdparty%2Fbinutils-gdb.git gdb, remote: fix notify debug nullptr dereference In remote_target:push_stop_reply, notif debug prints an element that has been moved. Print the element at the destination, instead. Approved-By: Simon Marchi --- diff --git a/gdb/remote.c b/gdb/remote.c index 1455838c2cf..735774903f3 100644 --- a/gdb/remote.c +++ b/gdb/remote.c @@ -8406,7 +8406,7 @@ remote_target::push_stop_reply (stop_reply_up new_event) if (notif_debug) gdb_printf (gdb_stdlog, "notif: push 'Stop' %s to queue %d\n", - new_event->ptid.to_string ().c_str (), + rs->stop_reply_queue.back ()->ptid.to_string ().c_str (), int (rs->stop_reply_queue.size ())); /* Mark the pending event queue only if async mode is currently enabled.