Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.debian.bugs.dist > #1154681
| From | Helge Deller <deller@gmx.de> |
|---|---|
| Newsgroups | linux.debian.bugs.dist |
| Subject | Bug#1040981: klibc-utils: segfault executing armhf binaries under qemu-user |
| Date | 2023-07-17 22:10 +0200 |
| Message-ID | <GSCHD-VEa-7@gated-at.bofh.it> (permalink) |
| References | (2 earlier) <GSwsx-RM4-3@gated-at.bofh.it> <GSBix-UDB-1@gated-at.bofh.it> <GSBse-UGY-5@gated-at.bofh.it> <GRdih-2QS-3@gated-at.bofh.it> <GSBse-UGY-5@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
This patch seems to work. Tested with qemu-arm and qemu-amd64.
diff --git a/linux-user/elfload.c b/linux-user/elfload.c
index a26200d9f3..b583018591 100644
--- a/linux-user/elfload.c
+++ b/linux-user/elfload.c
@@ -3615,6 +3631,13 @@ int load_elf_binary(struct linux_binprm *bprm, struct image_info *info)
if (elf_interpreter) {
load_elf_interp(elf_interpreter, &interp_info, bprm->buf);
+ /*
+ * adjust brk address if the interpreter was loaded above the main
+ * executable, e.g. happens with static binaries on armhf
+ */
+ if (interp_info.brk > info->brk) {
+ info->brk = interp_info.brk;
+ }
/* If the program interpreter is one of these two, then assume
an iBCS2 image. Otherwise assume a native linux image. */
Back to linux.debian.bugs.dist | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Bug#1040981: klibc-utils: segfault executing armhf binaries under qemu-user Helge Deller <deller@gmx.de> - 2023-07-17 15:00 +0200
Bug#1040981: klibc-utils: segfault executing armhf binaries under qemu-user Michael Tokarev <mjt@tls.msk.ru> - 2023-07-17 15:30 +0200
Bug#1040981: klibc-utils: segfault executing armhf binaries under qemu-user Helge Deller <deller@gmx.de> - 2023-07-17 20:40 +0200
Bug#1040981: klibc-utils: segfault executing armhf binaries under qemu-user Helge Deller <deller@gmx.de> - 2023-07-17 20:50 +0200
Bug#1040981: klibc-utils: segfault executing armhf binaries under qemu-user Helge Deller <deller@gmx.de> - 2023-07-17 22:10 +0200
Bug#1040981: klibc-utils: segfault executing armhf binaries under qemu-user Michael Tokarev <mjt@tls.msk.ru> - 2023-07-17 22:30 +0200
Bug#1040981: klibc-utils: segfault executing armhf binaries under qemu-user Helge Deller <deller@gmx.de> - 2023-07-17 22:40 +0200
csiph-web