Qemu 7.2.0 i386: core2: init crash (glibc) Description of problem: The toolchain-builder project (a side project of Buildroot to build pre-built toolchains) reported an issue with Qemu 7.2.0 for x86-core2--glibc--bleeding-edge toolchain, see: https://gitlab.com/buildroot.org/toolchains-builder/-/jobs/3731683337 Reverting back to Qemu 7.1.0, the system boot correctly with the same system image. I reproduced the issue with the current Qemu master (6b433719eabf0abc74cff0cfd5687f0137c4198a) Here is the boot log obtained with Qemu 7.2.0: ``` Run /sbin/init as init process random: fast init done EXT4-fs (vda): warning: mounting unchecked fs, running e2fsck is recommended EXT4-fs (vda): re-mounted. Opts: (null). Quota mode: disabled. Starting syslogd: OK traps: syslogd[52] general protection fault ip:b7e21465 sp:bfe59e6c error:0 in libc.so.6[b7d9b000+123000] Starting klogd: OK traps: klogd[56] general protection fault ip:b7e94465 sp:bf8f069c error:0 in libc.so.6[b7e0e000+123000] Running sysctl: traps: logger[62] general protection fault ip:b7e48b6c sp:bfd7d194 error:0 in libc.so.6[b7e05000+123000] Segmentation fault traps: logger[64] general protection fault ip:b7dd3b6c sp:bf9b8604 error:0 in libc.so.6[b7d90000+123000] Segmentation fault traps: init[100] general protection fault ip:b7dda465 sp:bfd5f42c error:0 in libc.so.6[b7d54000+123000] Kernel panic - not syncing: Attempted to kill init! exitcode=0x0000000b CPU: 0 PID: 1 Comm: init Not tainted 5.15.18 #1 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.16.1-0-g3208b098f51a-prebuilt.qemu.org 04/01/2014 Call Trace: dump_stack_lvl+0x32/0x41 dump_stack+0xd/0x10 panic+0x90/0x206 do_exit.cold+0xa9/0xa9 do_group_exit+0x2a/0x90 get_signal+0x115/0x7e0 arch_do_signal_or_restart+0x90/0x5a0 ? put_pid+0xc/0x20 ? kernel_clone+0x10b/0x3d0 exit_to_user_mode_prepare+0xf8/0x1c0 syscall_exit_to_user_mode+0x1b/0x40 do_int80_syscall_32+0x41/0x90 entry_INT80_32+0xf0/0xf0 EIP: 0xb7de5d88 Code: 37 01 00 00 65 ff 15 10 00 00 00 89 d0 5a 5b 5e 5f 5d c3 66 90 66 90 66 90 66 90 66 90 66 90 66 90 90 59 b8 be 00 00 00 cd 80 <51> 3d 01 f0 ff ff 0f 83 06 e9 f6 ff c3 e8 81 a0 06 00 05 9a a0 0e EAX: 00000064 EBX: 0059aa1c ECX: 00561f5b EDX: 00000008 ESI: 0059cc20 EDI: bfd5fa64 EBP: 0059b138 ESP: bfd5fa20 DS: 007b ES: 007b FS: 0000 GS: 0033 SS: 007b EFLAGS: 00000246 Kernel Offset: disabled ---[ end Kernel panic - not syncing: Attempted to kill init! exitcode=0x0000000b ]--- ``` I did a git bisect on qemu sources up to this commit: https://gitlab.com/qemu-project/qemu/-/commit/958e1dd1300f37f18b2161dfb4eb806fc8c19b44 Steps to reproduce: Build the Buildroot qemu_x86_defconfig with BR2_x86_core2 target architecture variant added manually 1. git clone https://gitlab.com/buildroot.org/buildroot.git 2. git switch --detach c419ef62d84b5be65599452ab84f7ed719bbe470 3. make qemu_x86_defconfig 4. make menuconfig (enable BR2_x86_core2) 5. make 6. ./output/images/start-qemu.sh Additional information: System built with gcc options: ``` i686-buildroot-linux-gnu-gcc.br_real' '--sysroot' 'output/host/i686-buildroot-linux-gnu/sysroot' '-fstack-protector-strong' '-fPIE' '-pie' '-Wl,-z,now' '-Wl,-z,relro' ```