Add a work around for segfaults we're seeing with qemu 8.2.0 when compiling webkitgtk on debian 11 autobuilder workers.
The issue has been reported upstream to work out an official fix. [YOCTO #15367] Signed-off-by: Richard Purdie <richard.pur...@linuxfoundation.org> --- meta/recipes-devtools/qemu/qemu.inc | 1 + .../recipes-devtools/qemu/qemu/fix_segv.patch | 47 +++++++++++++++++++ 2 files changed, 48 insertions(+) create mode 100644 meta/recipes-devtools/qemu/qemu/fix_segv.patch diff --git a/meta/recipes-devtools/qemu/qemu.inc b/meta/recipes-devtools/qemu/qemu.inc index ccb28804029..bc1440249d9 100644 --- a/meta/recipes-devtools/qemu/qemu.inc +++ b/meta/recipes-devtools/qemu/qemu.inc @@ -34,6 +34,7 @@ SRC_URI = "https://download.qemu.org/${BPN}-${PV}.tar.xz \ file://fixedmeson.patch \ file://0001-vfio-Include-libgen.h-for-basename-API.patch \ file://no-pip.patch \ + file://fix_segv.patch \ file://qemu-guest-agent.init \ file://qemu-guest-agent.udev \ " diff --git a/meta/recipes-devtools/qemu/qemu/fix_segv.patch b/meta/recipes-devtools/qemu/qemu/fix_segv.patch new file mode 100644 index 00000000000..da5ae87e0c4 --- /dev/null +++ b/meta/recipes-devtools/qemu/qemu/fix_segv.patch @@ -0,0 +1,47 @@ +With qemu 8.2.0 we started seeing SEGV errors when compiling webkitgtk from +usermode qemu: + +qemu-x86_64: QEMU internal SIGSEGV {code=MAPERR, addr=0x20} +Segmentation fault + +By bisection, this was tracked down to: + +commit 7b7a3366e142d3baeb3fd1d3660a50e7956c19eb +Author: Richard Henderson <richard.hender...@linaro.org> +Date: Tue Aug 8 20:02:19 2023 -0700 + + linux-user: Use walk_memory_regions for open_self_maps + + Replace the by-hand method of region identification with + the official user-exec interface. Cross-check the region + provided to the callback with the interval tree from + read_self_maps(). + + Tested-by: Helge Deller <del...@gmx.de> + Reviewed-by: Ilya Leoshkevich <i...@linux.ibm.com> + Signed-off-by: Richard Henderson <richard.hender...@linaro.org> + +and specifically to 'n' being NULL. For now, just skip in that case +until a proper fix can be identified. + +Reported upstream: https://www.mail-archive.com/qemu-devel@nongnu.org/msg1018813.html + +YOCTO #15367 + +Signed-off-by: Richard Purdie <richard.pur...@linuxfoundation.org> +Upstream-Status: Pending + +diff --git a/linux-user/syscall.c b/linux-user/syscall.c +index e384e14248..2577fb770d 100644 +--- a/linux-user/syscall.c ++++ b/linux-user/syscall.c +@@ -8085,6 +8085,9 @@ static int open_self_maps_2(void *opaque, target_ulong guest_start, + while (1) { + IntervalTreeNode *n = + interval_tree_iter_first(d->host_maps, host_start, host_start); ++ if (!n) { ++ return 0; ++ } + MapInfo *mi = container_of(n, MapInfo, itree); + uintptr_t this_hlast = MIN(host_last, n->last); + target_ulong this_gend = h2g(this_hlast) + 1; -- 2.40.1
-=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#194371): https://lists.openembedded.org/g/openembedded-core/message/194371 Mute This Topic: https://lists.openembedded.org/mt/103976454/21656 Group Owner: openembedded-core+ow...@lists.openembedded.org Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-