Re: [Qemu-devel] [PATCH] hw/core/generic-loader: Fix crash when running without CPU

2017-04-23 Thread Michael Tokarev
27.02.2017 22:36, Thomas Huth wrote: > On 25.01.2017 21:45, Thomas Huth wrote: >> When running QEMU with "-M none -device loader,file=kernel.elf", it >> currently crashes with a segmentation fault, because the "none"-machine >> does not have any CPU by default and the generic loader code tries >> t

Re: [Qemu-devel] [PATCH] hw/core/generic-loader: Fix crash when running without CPU

2017-02-27 Thread Alistair Francis
On Fri, Jan 27, 2017 at 9:06 AM, Peter Maydell wrote: > On 26 January 2017 at 05:50, Thomas Huth wrote: >> I think there is no real use case yet. But this fix is 1) simpler than >> doing an error_report() + exit() here, and 2) maybe the vision of >> constructing machines on the fly with QEMU will

Re: [Qemu-devel] [PATCH] hw/core/generic-loader: Fix crash when running without CPU

2017-02-27 Thread Thomas Huth
On 25.01.2017 21:45, Thomas Huth wrote: > When running QEMU with "-M none -device loader,file=kernel.elf", it > currently crashes with a segmentation fault, because the "none"-machine > does not have any CPU by default and the generic loader code tries > to dereference s->cpu. Fix it by adding an a

Re: [Qemu-devel] [PATCH] hw/core/generic-loader: Fix crash when running without CPU

2017-01-26 Thread Peter Maydell
On 26 January 2017 at 05:50, Thomas Huth wrote: > I think there is no real use case yet. But this fix is 1) simpler than > doing an error_report() + exit() here, and 2) maybe the vision of > constructing machines on the fly with QEMU will eventually come true one > day in the distant future, so wi

Re: [Qemu-devel] [PATCH] hw/core/generic-loader: Fix crash when running without CPU

2017-01-26 Thread Alistair Francis
On Thu, Jan 26, 2017 at 12:38 AM, Laurent Vivier wrote: > Le 26/01/2017 à 06:50, Thomas Huth a écrit : >> On 26.01.2017 00:26, Alistair Francis wrote: >>> On Wed, Jan 25, 2017 at 12:52 PM, Laurent Vivier wrote: Le 25/01/2017 à 21:45, Thomas Huth a écrit : > When running QEMU with "-M non

Re: [Qemu-devel] [PATCH] hw/core/generic-loader: Fix crash when running without CPU

2017-01-26 Thread Laurent Vivier
Le 26/01/2017 à 06:50, Thomas Huth a écrit : > On 26.01.2017 00:26, Alistair Francis wrote: >> On Wed, Jan 25, 2017 at 12:52 PM, Laurent Vivier wrote: >>> Le 25/01/2017 à 21:45, Thomas Huth a écrit : When running QEMU with "-M none -device loader,file=kernel.elf", it currently crashes wi

Re: [Qemu-devel] [PATCH] hw/core/generic-loader: Fix crash when running without CPU

2017-01-25 Thread Thomas Huth
On 26.01.2017 00:26, Alistair Francis wrote: > On Wed, Jan 25, 2017 at 12:52 PM, Laurent Vivier wrote: >> Le 25/01/2017 à 21:45, Thomas Huth a écrit : >>> When running QEMU with "-M none -device loader,file=kernel.elf", it >>> currently crashes with a segmentation fault, because the "none"-machine

Re: [Qemu-devel] [PATCH] hw/core/generic-loader: Fix crash when running without CPU

2017-01-25 Thread Alistair Francis
On Wed, Jan 25, 2017 at 12:52 PM, Laurent Vivier wrote: > Le 25/01/2017 à 21:45, Thomas Huth a écrit : >> When running QEMU with "-M none -device loader,file=kernel.elf", it >> currently crashes with a segmentation fault, because the "none"-machine >> does not have any CPU by default and the gener

Re: [Qemu-devel] [PATCH] hw/core/generic-loader: Fix crash when running without CPU

2017-01-25 Thread Laurent Vivier
Le 25/01/2017 à 21:45, Thomas Huth a écrit : > When running QEMU with "-M none -device loader,file=kernel.elf", it > currently crashes with a segmentation fault, because the "none"-machine > does not have any CPU by default and the generic loader code tries > to dereference s->cpu. Fix it by adding

[Qemu-devel] [PATCH] hw/core/generic-loader: Fix crash when running without CPU

2017-01-25 Thread Thomas Huth
When running QEMU with "-M none -device loader,file=kernel.elf", it currently crashes with a segmentation fault, because the "none"-machine does not have any CPU by default and the generic loader code tries to dereference s->cpu. Fix it by adding an appropriate check for a NULL pointer. Reported-b