Skip to content

Fix JIT crash on scheduler destroy by joining threads#2280

Merged
bettio merged 2 commits intoatomvm:release-0.7from
pguyot:w17/fix-jit-crash-test_exit2
Apr 27, 2026
Merged

Fix JIT crash on scheduler destroy by joining threads#2280
bettio merged 2 commits intoatomvm:release-0.7from
pguyot:w17/fix-jit-crash-test_exit2

Conversation

@pguyot
Copy link
Copy Markdown
Collaborator

@pguyot pguyot commented Apr 26, 2026

Fix a crash happening on VM teardown with generic_unix and JIT backends
that require an epilog after tail calls (arm32, armv6m, xtensa), observed
in CI with test_exit2 with qemu. The JIT page would be unmapped before the
JIT code returned.

Also add -c option to test-erlang to debug future similar cases.

These changes are made under both the "Apache 2.0" and the "GNU Lesser General
Public License 2.1 or later" license terms (dual license).

SPDX-License-Identifier: Apache-2.0 OR LGPL-2.1-or-later

pguyot added 2 commits April 26, 2026 08:14
Signed-off-by: Paul Guyot <pguyot@kallisys.net>
Fix a crash happening on VM teardown with generic_unix and JIT backends
that require an epilog after tail calls (arm32, armv6m, xtensa), observed
in CI with test_exit2 with qemu. The JIT page would be unmapped before the
JIT code returned.

Signed-off-by: Paul Guyot <pguyot@kallisys.net>
@bettio bettio merged commit 6cd6a2d into atomvm:release-0.7 Apr 27, 2026
159 of 165 checks passed
bettio added a commit that referenced this pull request Apr 27, 2026
Merge fixes, features, and optimizations from release-0.7, including:
- JIT: Add WASM32 backend with emscripten integration (#2260)
- Add SPI support to STM32 platform (#2127)
- Add network:wifi_scan/0,1 to esp32 network driver (#1165)
- Add serial (UART) distribution support (#2249)
- Add more reset reasons to esp:reset_reason/0 (#2275)
- Implement nif_start, executable_line and debug_line opcodes (#2264)
- MCUs: update deprecated use of term_from_int32 (#2241)
- Fix JIT crash on scheduler destroy by joining threads (#2280)
- Fix race condition in context_destroy (#2277)
- JIT x86-64: fix xorq encoding to use signed shorter form (#2278)
- JIT arm32: assemble push/pop with single reg as gnu as does (#2276)
- Fix sign of result of several functions from binary module (#2256)
- Fix offset and mod_offset sign using size_t (#2266)
- Fix warning with os:system_time/1 (#2265)
- Fix test_timer assertions (#2261)
- Normalize system_architecture strings (#2171)
- emscripten: Use EXPORT_ES6 setting and .mjs suffix (#2273)
- RP2: Improve initial flash message (#2122)
- CI: Rename pico combined for sorting (#2220)
- STM32 CI: Use tag release for renode 1.16.1 (#2268)
- CI: Fix macos - use setup-beam for gleam (#2263)
@pguyot pguyot deleted the w17/fix-jit-crash-test_exit2 branch April 27, 2026 17:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants