All of lore.kernel.org
 help / color / mirror / Atom feed
* [Bug 1918302] [NEW] qemu-system-arm segfaults while servicing SYS_HEAPINFO
@ 2021-03-09 15:30 Simon Tatham
  2021-03-11 18:44 ` [Bug 1918302] " Peter Maydell
                   ` (16 more replies)
  0 siblings, 17 replies; 18+ messages in thread
From: Simon Tatham @ 2021-03-09 15:30 UTC (permalink / raw)
  To: qemu-devel

Public bug reported:

I compiled QEMU version 5.2.0 from source on Ubuntu 18.04, and tried to
use it to run the attached bare-metal Arm hello-world image, using the
command line

qemu-system-arm -M microbit -semihosting -nographic -device
loader,file=hello.hex

The result was that qemu-system-arm itself died of a segfault. Compiling
it for debugging, the location of the segfault was in target/arm/arm-
semi.c, in the case handler for the semihosting call
TARGET_SYS_HEAPINFO, on line 1020 which assigns to 'rambase':

            const struct arm_boot_info *info = env->boot_info;
            target_ulong rambase = info->loader_start;

and the problem seems to be that 'info', aka env->boot_info, is NULL in
this context.

** Affects: qemu
     Importance: Undecided
         Status: New

** Attachment added: "Image that triggers the failure, in ihex format"
   https://bugs.launchpad.net/bugs/1918302/+attachment/5475149/+files/hello.hex

-- 
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/1918302

Title:
  qemu-system-arm segfaults while servicing SYS_HEAPINFO

Status in QEMU:
  New

Bug description:
  I compiled QEMU version 5.2.0 from source on Ubuntu 18.04, and tried
  to use it to run the attached bare-metal Arm hello-world image, using
  the command line

  qemu-system-arm -M microbit -semihosting -nographic -device
  loader,file=hello.hex

  The result was that qemu-system-arm itself died of a segfault.
  Compiling it for debugging, the location of the segfault was in
  target/arm/arm-semi.c, in the case handler for the semihosting call
  TARGET_SYS_HEAPINFO, on line 1020 which assigns to 'rambase':

              const struct arm_boot_info *info = env->boot_info;
              target_ulong rambase = info->loader_start;

  and the problem seems to be that 'info', aka env->boot_info, is NULL
  in this context.

To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/1918302/+subscriptions


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

end of thread, other threads:[~2021-05-01  5:52 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-09 15:30 [Bug 1918302] [NEW] qemu-system-arm segfaults while servicing SYS_HEAPINFO Simon Tatham
2021-03-11 18:44 ` [Bug 1918302] " Peter Maydell
2021-03-12 15:00 ` Peter Maydell
2021-03-12 15:04 ` Peter Maydell
2021-03-15 10:53 ` Alex Bennée
2021-03-15 12:42 ` Alex Bennée
2021-03-15 12:43 ` Alex Bennée
2021-03-15 12:45 ` Alex Bennée
2021-03-15 13:28 ` Peter Maydell
2021-03-25 11:49 ` Alex Bennée
2021-03-25 13:16 ` Peter Maydell
2021-03-25 14:48 ` Simon Tatham
2021-03-25 14:49 ` Simon Tatham
2021-03-25 15:31 ` Peter Maydell
2021-03-25 15:49 ` Simon Tatham
2021-04-30  9:16 ` Thomas Huth
2021-04-30 10:13 ` Peter Maydell
2021-05-01  5:42 ` Thomas Huth

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.