ptitSeb / box64

Box64 - Linux Userspace x86_64 Emulator with a twist, targeted at ARM64 Linux devices
https://box86.org
MIT License
3.74k stars 267 forks source link

Box64 bash makes you exit twice #1854

Open m1m1k4tz opened 1 week ago

m1m1k4tz commented 1 week ago

I've noticed this happens after you compile it and install it too

📦[alex@asahi-krun ~]$ box64 ~/box64/tests/bash
Dynarec for ARM64, with extension: ASIMD AES CRC32 PMULL ATOMICS SHA1 SHA2 USCAT FLAGM FLAGM2 FRINT PageSize:16384 Running on Icestorm-M1 Firestorm-M1 with 8 Cores
Will use Hardware counter measured at 24.0 MHz emulating 3.0 GHz
Params database has 90 entries
Box64 with Dynarec v0.3.1 9e44c653 built on Sep 22 2024 09:07:24
BOX64: Detected 48bits at least of address space
Counted 92 Env var
BOX64 LIB PATH: BOX64 BIN PATH: ./:bin/:/home/alex/.cargo/bin/:/home/alex/.local/bin/:/home/alex/bin/:/usr/lib64/ccache/:/usr/local/bin/:/usr/bin/:/bin/:/usr/local/sbin/:/usr/sbin/:/sbin/:/usr/local/sbin/:/usr/local/bin/:/usr/sbin/:/usr/bin/:/sbin/:/bin/
Looking for /home/alex/box64/tests/bash
bash detected, disabling banner
Apply RC params for bash
📦[alex@asahi-krun ~]$ exit
exit
Segmentation fault (core dumped)
📦[alex@asahi-krun ~]$ exit
exit
Segmentation fault (core dumped)
📦[alex@asahi-krun ~]$ 
ptitSeb commented 1 week ago

Pretty sure it's still a side effect of 16k page size simlation there. I nned to improve that simlation, especially when exiting libs (where too much memory get freed on munmap).

m1m1k4tz commented 1 week ago

Oh okay, I only noticed it after I compiled box64 then I realized I need to exit before running it or it would crash

m1m1k4tz commented 1 week ago

This looks fixed now

m1m1k4tz commented 1 day ago

Reopening because I just came across it again