You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Automatic cycle collection crashes intermittently (SIGBUS) in a loop of two-object cycles on macOS arm64 #413
tests/aot/cases/autogc_cycle_loop.php (added with the manticore-fmt fixes, #380) crashes intermittently with SIGBUS (exit 138) on macOS arm64. The program creates two-object reference cycles in a loop and references gc_collect_cycles() (so the automatic cycle collector is linked):
macOS 27.0.1 arm64, binary compiled by the main compiler (515a500a) and by the site branch compiler: 3 of 6 and 4 of 5 runs exit 138, the rest print done.
With 3 000 000 iterations: 2 of 8 runs crash. More iterations do not make it deterministic, so the crash is not about heap growth.
It passes on CI (linux arm64/amd64, alpine, macOS) for the same commit, so it may be platform- or ASLR-dependent.
Why there is no tests/aot/repro/ file
xfail.sh needs a deterministic red repro; this one is random, so tools/file_bug.sh would refuse it (it passes about half the time). The case is already in tests/aot/cases/, which is where a fix would be verified. A fix needs a loop of at least ~20 runs to be believable.
Suspicion (unverified)
Two-object cycles are collected by the automatic collector during the loop; a collected-then-reused object being touched by the loop's own stores would give a bus error rather than a segfault on arm64. Worth running under MANTICORE_... gmalloc/lldb per docs/ notes ("libgmalloc OUTSIDE lldb + MANTICORE_FRAME_POINTERS=1") to get the faulting address.
Activity