All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-trivial] [PATCH for v1.6] pc: Fix initialization of the ram_memory variable.
@ 2013-08-16 14:46 ` Anthony PERARD
  0 siblings, 0 replies; 23+ messages in thread
From: Anthony PERARD @ 2013-08-16 14:46 UTC (permalink / raw)
  To: QEMU-devel; +Cc: qemu-trivial, Anthony PERARD, Stefano Stabellini, Xen Devel

In some cases (Xen), it will not be initialized before to be used. This
leads to segv.

Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>

---

It works with this simple initialization to NULL, but would it be
necessary (or better) to assign a proper value to this variables ?
---
 hw/i386/pc_piix.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c
index 6e1e654..596d433 100644
--- a/hw/i386/pc_piix.c
+++ b/hw/i386/pc_piix.c
@@ -86,7 +86,7 @@ static void pc_init1(MemoryRegion *system_memory,
     BusState *idebus[MAX_IDE_BUS];
     ISADevice *rtc_state;
     ISADevice *floppy;
-    MemoryRegion *ram_memory;
+    MemoryRegion *ram_memory = NULL;
     MemoryRegion *pci_memory;
     MemoryRegion *rom_memory;
     DeviceState *icc_bridge;
-- 
Anthony PERARD



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

end of thread, other threads:[~2013-08-29 14:18 UTC | newest]

Thread overview: 23+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-08-16 14:46 [Qemu-trivial] [PATCH for v1.6] pc: Fix initialization of the ram_memory variable Anthony PERARD
2013-08-16 14:46 ` [Qemu-devel] " Anthony PERARD
2013-08-26 15:00 ` [Qemu-trivial] [Xen-devel] " Fabio Fantoni
2013-08-26 15:00   ` [Qemu-devel] " Fabio Fantoni
2013-08-29  8:32   ` Fabio Fantoni
2013-08-29  8:32   ` [Qemu-trivial] [Xen-devel] " Fabio Fantoni
2013-08-29  8:32     ` [Qemu-devel] " Fabio Fantoni
2013-08-29 10:59     ` [Qemu-trivial] " Stefano Stabellini
2013-08-29 10:59       ` [Qemu-devel] " Stefano Stabellini
2013-08-29 11:05       ` [Qemu-trivial] " Stefano Stabellini
2013-08-29 11:05         ` [Qemu-devel] " Stefano Stabellini
2013-08-29 11:05       ` Stefano Stabellini
2013-08-29 10:59     ` Stefano Stabellini
2013-08-26 15:00 ` Fabio Fantoni
2013-08-29  8:48 ` [Qemu-trivial] [Qemu-devel] " Peter Maydell
2013-08-29  8:48   ` Peter Maydell
2013-08-29  8:48 ` Peter Maydell
2013-08-29  9:00 ` [Qemu-trivial] " Paolo Bonzini
2013-08-29  9:00   ` [Qemu-devel] " Paolo Bonzini
2013-08-29  9:42   ` Fabio Fantoni
2013-08-29  9:42   ` [Qemu-trivial] [Xen-devel] " Fabio Fantoni
2013-08-29  9:42     ` [Qemu-devel] " Fabio Fantoni
2013-08-29  9:00 ` Paolo Bonzini

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.