qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH for-5.2 0/3] hmp: Fix arg evaluation crash (regression)
@ 2020-11-13 11:43 Kevin Wolf
  2020-11-13 11:43 ` [PATCH for-5.2 1/3] hmp: Pass monitor to mon_get_cpu() Kevin Wolf
                   ` (4 more replies)
  0 siblings, 5 replies; 8+ messages in thread
From: Kevin Wolf @ 2020-11-13 11:43 UTC (permalink / raw)
  To: qemu-devel; +Cc: kwolf, lichun, dgilbert, armbru

When I restricted the section where the current monitor is set to only
the command handler, I missed that monitor_parse_arguments() can use it
indirectly, too, when evaluating register variables. These cases get
NULL now and crash (easy to reproduce with "x $pc").

This series passes the right monitor object down instead of using
monitor_cur(), which fixes the crash.

Kevin Wolf (3):
  hmp: Pass monitor to mon_get_cpu()
  hmp: Pass monitor to MonitorDef.get_value()
  hmp: Pass monitor to mon_get_cpu_env()

 include/monitor/hmp-target.h |  7 ++++---
 monitor/monitor-internal.h   |  2 +-
 monitor/hmp.c                |  2 +-
 monitor/misc.c               | 24 ++++++++++++------------
 target/i386/monitor.c        | 11 ++++++-----
 target/m68k/monitor.c        |  2 +-
 target/nios2/monitor.c       |  2 +-
 target/ppc/monitor.c         | 22 +++++++++++++---------
 target/riscv/monitor.c       |  2 +-
 target/sh4/monitor.c         |  2 +-
 target/sparc/monitor.c       | 12 +++++++-----
 target/xtensa/monitor.c      |  2 +-
 12 files changed, 49 insertions(+), 41 deletions(-)

-- 
2.28.0



^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2020-11-13 12:47 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-11-13 11:43 [PATCH for-5.2 0/3] hmp: Fix arg evaluation crash (regression) Kevin Wolf
2020-11-13 11:43 ` [PATCH for-5.2 1/3] hmp: Pass monitor to mon_get_cpu() Kevin Wolf
2020-11-13 11:43 ` [PATCH for-5.2 2/3] hmp: Pass monitor to MonitorDef.get_value() Kevin Wolf
2020-11-13 11:43 ` [PATCH for-5.2 3/3] hmp: Pass monitor to mon_get_cpu_env() Kevin Wolf
2020-11-13 12:13 ` [PATCH for-5.2 0/3] hmp: Fix arg evaluation crash (regression) Dr. David Alan Gilbert
2020-11-13 12:43   ` Kevin Wolf
2020-11-13 12:44     ` Dr. David Alan Gilbert
2020-11-13 12:46 ` Dr. David Alan Gilbert

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).