Repository navigation
Commit 32dfb80
committed
Add a multi-threaded GC stress test, run in every GC mode
test/gc_stress builds and rewires an object graph on four threads for a
set time while the main thread requests collections and compactions. It
mixes cross-thread references, weak refs and weak maps, finalizers and
zombies, large objects, arrays, maps, strings, closures, GC-free zones
and short-lived threads, and checks every object it can still reach.
The graph's size is bounded, so memory stays flat however long it runs.
It prints its seed, and exits non-zero on a failed check.
CI runs it for 30 seconds on every platform in the default, generational,
moving, always-move, verify, generational verify, big blocks and
check-pointer modes. Upstream hxcpp at e638733 fails it within seconds,
with a crash or a corrupted object from a short-lived thread.
Related: HaxeFoundation/hxcpp#863, HaxeFoundation/hxcpp#872, HaxeFoundation/hxcpp#740
Fixes #851 parent b565b66 commit 32dfb80
3 files changed
Lines changed: 517 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
65 | 65 | | |
66 | 66 | | |
67 | 67 | | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
68 | 114 | | |
69 | 115 | | |
70 | 116 | | |
| |||
0 commit comments