[Bug 1918302] Re: qemu-system-arm segfaults while servicing SYS_HEAPINFO

2021-04-30 Thread Thomas Huth
This is an automated cleanup. This bug report has been moved to QEMU's new bug tracker on gitlab.com and thus gets marked as 'expired' now. Please continue with the discussion here: https://gitlab.com/qemu-project/qemu/-/issues/61 ** Changed in: qemu Status: Confirmed => Expired ** Chan

[Bug 1918302] Re: qemu-system-arm segfaults while servicing SYS_HEAPINFO

2021-04-30 Thread Peter Maydell
I still want to look at this. ** Changed in: qemu Status: Incomplete => Confirmed -- 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

[Bug 1918302] Re: qemu-system-arm segfaults while servicing SYS_HEAPINFO

2021-04-30 Thread Thomas Huth
The state of this bug is "Fix committed", but the last comments look like there is still work to do ... should this get reset to "New" or can we close this bug now? ** Changed in: qemu Status: Fix Committed => Incomplete -- You received this bug notification because you are a member of qe

[Bug 1918302] Re: qemu-system-arm segfaults while servicing SYS_HEAPINFO

2021-03-25 Thread Simon Tatham
Yes, fair enough. I suppose what I meant was that that particular part of the startup code was *regarding* SP as being uninitialised: it didn't read it, or use it, or set it on purpose to any kind of interim temp value before calling SYS_HEAPINFO. It's true, of course, that this particular image d

[Bug 1918302] Re: qemu-system-arm segfaults while servicing SYS_HEAPINFO

2021-03-25 Thread Peter Maydell
Since this is an M-profile board, "SP is literally uninitialised at this point" isn't correct unless the loaded image failed to provide a valid vector table, because M-profile loads the initial SP from there. Generally for bare metal programs, the linker has a much better idea of what would be a go

[Bug 1918302] Re: qemu-system-arm segfaults while servicing SYS_HEAPINFO

2021-03-25 Thread Simon Tatham
Firstly, I agree with Peter's comment – this test image is exactly an example of what he describes, in that it carefully doesn't make any use of the value of SP it started up with (doesn't push or pop anything, doesn't make sp-relative offsets). Very near the start, it invokes SYS_HEAPINFO to decid

[Bug 1918302] Re: qemu-system-arm segfaults while servicing SYS_HEAPINFO

2021-03-25 Thread Simon Tatham
Oops – naturally, I realised just *after* hitting send that it would have been a good idea to say exactly which git commit I was testing on. It was 9e2e9fe3df9f539f8b6941ceb96d25355fdae47e . -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to Q

[Bug 1918302] Re: qemu-system-arm segfaults while servicing SYS_HEAPINFO

2021-03-25 Thread Peter Maydell
I think there's still work to do here -- we don't properly tell semihosting where the memory is on M-profile or in all A-profile cases. I don't think that "look at the stack pointer" is a very good heuristic. -- You received this bug notification because you are a member of qemu- devel-ml, which

[Bug 1918302] Re: qemu-system-arm segfaults while servicing SYS_HEAPINFO

2021-03-25 Thread Alex Bennée
I think this is fixed now - it would be useful if the OP could confirm with the current state of master. ** Changed in: qemu Status: In Progress => Fix Committed -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.lau

[Bug 1918302] Re: qemu-system-arm segfaults while servicing SYS_HEAPINFO

2021-03-15 Thread Peter Maydell
Looking at the current stack seems an odd approach, because often semihosting guest programs use HEAPINFO to find out what they should set SP to in the first place... -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launch

[Bug 1918302] Re: qemu-system-arm segfaults while servicing SYS_HEAPINFO

2021-03-15 Thread Alex Bennée
Ends doing: (gdb) 0x0ce4 in ?? () => 0xce4: b.n 0xce4 -- 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 Q

[Bug 1918302] Re: qemu-system-arm segfaults while servicing SYS_HEAPINFO

2021-03-15 Thread Alex Bennée
Testing with: Subject: [PATCH v5 0/5] semihosting/next (SYS_HEAPINFO) Date: Fri, 12 Mar 2021 10:20:24 + Message-Id: <20210312102029.17017-1-alex.ben...@linaro.org> it doesn't seem to segfault QEMU anymore although the guest itself hangs which probably means it's not happy with the numbers it

[Bug 1918302] Re: qemu-system-arm segfaults while servicing SYS_HEAPINFO

2021-03-15 Thread Alex Bennée
I think this was fixed earlier by: commit 095f8c029319b79cce487e3b566cd826b93da3e6 Author: Keith Packard Date: Fri Jan 8 22:42:51 2021 + semihosting: Support SYS_HEAPINFO when env->boot_info is not set env->boot_info is only set in some ARM startup paths, so we cannot rely on

[Bug 1918302] Re: qemu-system-arm segfaults while servicing SYS_HEAPINFO

2021-03-15 Thread Alex Bennée
** Tags added: semihosting -- 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

[Bug 1918302] Re: qemu-system-arm segfaults while servicing SYS_HEAPINFO

2021-03-12 Thread Peter Maydell
...oh, and also for A-profile where we do a boot of firmware and not a Linux-kernel style boot. -- 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 servicin

[Bug 1918302] Re: qemu-system-arm segfaults while servicing SYS_HEAPINFO

2021-03-12 Thread Peter Maydell
Note that this only happens for M-profile in system emulation mode. -- 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 QE

[Bug 1918302] Re: qemu-system-arm segfaults while servicing SYS_HEAPINFO

2021-03-11 Thread Peter Maydell
** Tags added: arm -- 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 ver