qemu{,-user-static}: fix qemu-aarch64 segfault on musl
This commit is contained in:
parent
b0b59be315
commit
3abd14929b
|
@ -2,7 +2,7 @@
|
|||
# This package should be updated together with qemu
|
||||
pkgname=qemu-user-static
|
||||
version=9.0.0
|
||||
revision=1
|
||||
revision=2
|
||||
build_style=configure
|
||||
configure_args="--prefix=/usr --sysconfdir=/etc --libexecdir=/usr/libexec
|
||||
--disable-kvm --disable-png --disable-virtfs --disable-fdt --disable-seccomp
|
||||
|
|
|
@ -0,0 +1,33 @@
|
|||
source: https://gitlab.com/qemu-project/qemu/-/issues/2353
|
||||
|
||||
diff --git a/linux-user/mmap.c b/linux-user/mmap.c
|
||||
index be3b9a6..dad29ef 100644
|
||||
--- a/linux-user/mmap.c
|
||||
+++ b/linux-user/mmap.c
|
||||
@@ -559,7 +559,7 @@ static abi_long mmap_h_eq_g(abi_ulong start, abi_ulong len,
|
||||
int host_prot, int flags, int page_flags,
|
||||
int fd, off_t offset)
|
||||
{
|
||||
- void *p, *want_p = g2h_untagged(start);
|
||||
+ void *p, *want_p = start ? g2h_untagged(start) : 0;
|
||||
abi_ulong last;
|
||||
|
||||
p = mmap(want_p, len, host_prot, flags, fd, offset);
|
||||
@@ -609,7 +609,7 @@ static abi_long mmap_h_lt_g(abi_ulong start, abi_ulong len, int host_prot,
|
||||
int mmap_flags, int page_flags, int fd,
|
||||
off_t offset, int host_page_size)
|
||||
{
|
||||
- void *p, *want_p = g2h_untagged(start);
|
||||
+ void *p, *want_p = start ? g2h_untagged(start) : 0;
|
||||
off_t fileend_adj = 0;
|
||||
int flags = mmap_flags;
|
||||
abi_ulong last, pass_last;
|
||||
@@ -739,7 +739,7 @@ static abi_long mmap_h_gt_g(abi_ulong start, abi_ulong len,
|
||||
int flags, int page_flags, int fd,
|
||||
off_t offset, int host_page_size)
|
||||
{
|
||||
- void *p, *want_p = g2h_untagged(start);
|
||||
+ void *p, *want_p = start ? g2h_untagged(start) : 0;
|
||||
off_t host_offset = offset & -host_page_size;
|
||||
abi_ulong last, real_start, real_last;
|
||||
bool misaligned_offset = false;
|
|
@ -2,7 +2,7 @@
|
|||
# This package should be updated together with qemu-user-static
|
||||
pkgname=qemu
|
||||
version=9.0.0
|
||||
revision=1
|
||||
revision=2
|
||||
build_style=configure
|
||||
configure_args="--prefix=/usr --sysconfdir=/etc --libexecdir=/usr/libexec --localstatedir=/var
|
||||
--disable-glusterfs --disable-xen --enable-docs --enable-kvm --enable-libusb --enable-pie
|
||||
|
|
Loading…
Reference in New Issue