A collection of test programs to verify Box64 behavior, reproduce bugs, and validate fixes.
These are x86_64 Linux programs designed to be run under Box64 on ARM64/RV64/LA64 systems.
Before working on these tests, it's helpful to understand how Box64 works internally:
- How Box64 Works - Complete step-by-step walkthrough of x86_64 emulation, dynarec translation, and syscall handling
- How Box64 Works Part 2 - Process & thread management, fork handling, TLS, and thread cancellation
These documents explain key concepts like:
- The dynarec 4-pass compilation pipeline
- Register mapping (x86_64 → ARM64)
- Deferred fork mechanism (
emu->forkflag) - Thread-local storage (TLS) setup
- The
in_usedreference counting for dynablock lifecycle
- x86_64 Linux environment (native, Docker, or cross-compiler)
- GCC with pthread support
make allmake 001_fork_in_used_leakmake docker-build| Prefix | Category |
|---|---|
| 001-099 | Memory management / Dynarec |
| 100-199 | Threading / Synchronization |
| 200-299 | Signals / Exception handling |
| 300-399 | ELF loading / Libraries |
| 400-499 | Syscalls |
| 500-599 | Performance / Stress tests |
| ID | Name | Description | Status |
|---|---|---|---|
| 001 | fork_in_used_leak | Stale dynablock in_used after fork() |
Open |
| 002 | 0f00_missing_braces | Missing braces in x64run0f.c opcode 0x00 | Open |
On ARM64 Linux with Box64:
BOX64_DYNAREC=1 BOX64_LOG=1 box64 ./bin/001_fork_in_used_leak- Create a new directory:
NNN_test_name/ - Add source files and a local
Makefile - Add entry to the test list above
- Update root
Makefile
MIT - Same as Box64