Viktor Vaczi
d538b73557
fix(wx): thread-safe wxString for the AsyncLoad fan-out — CvPcb-open trap solved
...
The ~1/9 wasm trap on CvPcb open ("index out of bounds" / "indirect call to
null" in a footprint AsyncLoad pool worker, then eeschema aborting on the
broken future — and the eeschema-fp-selector "CI-only" trap family, which was
never llvmpipe-specific) was wxString's UTF-8 build mutating SHARED strings on
read-only access from concurrent pool workers: every iterator ctor/dtor
spliced an intrusive list inside the string object, and torn splices wrote
through dead node pointers into other threads' stack frames. Second defect:
the UTF-8 position cache returned stale offsets when another thread's string
died and its address was reused.
Fixed in the wxwidgets fork (per-thread iterator registry + position cache
disabled under Emscripten) — kicad is untouched and AsyncLoad keeps its full
multi-worker fan-out. Falsified along the way (all perturbation masks, not
fixes): serializing the items, mimalloc vs dlmalloc, pthread stack size,
ASYNCIFY_STACK_SIZE, private-copy EnumFromStr, hot-path logging.
New red-first standalone app tests/apps/standalone/wxstring-mt (+ spec
coroutine-wxstring-mt.spec.ts, wx-chromium + coroutine-firefox): shared-string
compares alternating with wide-literal conversions reproduce the exact editor
trap signatures on the unfixed wx and run 4.7M rounds clean on the fixed one;
the pos-cache address-reuse dance corrupts on the first reuse before and
survives 673 after; two guard modes keep the iterator fix-up feature honest
(incl. an anti-elision liveness check — balanced register/unregister pairs in
tight loops can legally be optimized away, so a naive red test tests nothing).
Verification: wx+coroutine suites 382 passed; in-app AsyncLoad hammer 3x1000
rounds clean (baseline died <10); eeschema-assign-footprints spec 20/20
firefox + 20/20 chromium on the final build; lint:determinism clean.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Rb9jsqtHsC3tHTaJ45244j
2026-07-20 11:56:20 +02:00
..
utils
e2e/CI: dual-engine suites, per-engine screenshots, SwiftShader retired, prod web suite, CI-coverage gate
2026-07-17 12:21:54 +02:00
3d-webgl.spec.ts
test(3d): screenshot-baseline TDD suite for the 3D viewer OpenGL->WebGL port — 47 native goldens + red-state WebGL harness
2026-07-03 15:45:58 +02:00
aui-resize.spec.ts
e2e/CI: dual-engine suites, per-engine screenshots, SwiftShader retired, prod web suite, CI-coverage gate
2026-07-17 12:21:54 +02:00
aui.spec.ts
test(determinism): deterministic waits + stableShot screenshots; drop blind sleeps/ifs/retries
2026-07-07 10:50:24 +02:00
auinotebook.spec.ts
test(determinism): deterministic waits + stableShot screenshots; drop blind sleeps/ifs/retries
2026-07-07 10:50:24 +02:00
bitmapbuttons.spec.ts
test(determinism): deterministic waits + stableShot screenshots; drop blind sleeps/ifs/retries
2026-07-07 10:50:24 +02:00
bitmask.spec.ts
test(determinism): deterministic waits + stableShot screenshots; drop blind sleeps/ifs/retries
2026-07-07 10:50:24 +02:00
boot.spec.ts
refactor: collapse dual-mode plumbing — the DOM port is the only WASM build
2026-06-12 20:19:48 +02:00
calendar.spec.ts
test(determinism): deterministic waits + stableShot screenshots; drop blind sleeps/ifs/retries
2026-07-07 10:50:24 +02:00
clipboard.spec.ts
test(determinism): deterministic waits + stableShot screenshots; drop blind sleeps/ifs/retries
2026-07-07 10:50:24 +02:00
collapse-relayout.spec.ts
test(determinism): deterministic waits + stableShot screenshots; drop blind sleeps/ifs/retries
2026-07-07 10:50:24 +02:00
collapsible.spec.ts
test(determinism): deterministic waits + stableShot screenshots; drop blind sleeps/ifs/retries
2026-07-07 10:50:24 +02:00
contextmenu.spec.ts
e2e/CI: dual-engine suites, per-engine screenshots, SwiftShader retired, prod web suite, CI-coverage gate
2026-07-17 12:21:54 +02:00
coroutine-async-preload.spec.ts
feat(wasm-eh): migrate the WASM build to native wasm exceptions (+ 3D viewer default-on)
2026-06-30 09:40:26 +02:00
coroutine-nested.spec.ts
e2e/CI: dual-engine suites, per-engine screenshots, SwiftShader retired, prod web suite, CI-coverage gate
2026-07-17 12:21:54 +02:00
coroutine-pthread-ondemand.spec.ts
feat(wasm-eh): migrate the WASM build to native wasm exceptions (+ 3D viewer default-on)
2026-06-30 09:40:26 +02:00
coroutine-pthread.spec.ts
test(determinism): deterministic waits + stableShot screenshots; drop blind sleeps/ifs/retries
2026-07-07 10:50:24 +02:00
coroutine-raytrace-modal.spec.ts
feat(wasm-eh): migrate the WASM build to native wasm exceptions (+ 3D viewer default-on)
2026-06-30 09:40:26 +02:00
coroutine-raytrace.spec.ts
test: 💍 deadlock test + readme update
2026-06-19 09:22:58 +02:00
coroutine-threadpool-real.spec.ts
feat(wasm-eh): migrate the WASM build to native wasm exceptions (+ 3D viewer default-on)
2026-06-30 09:40:26 +02:00
coroutine-wxstring-mt.spec.ts
fix(wx): thread-safe wxString for the AsyncLoad fan-out — CvPcb-open trap solved
2026-07-20 11:56:20 +02:00
coroutine.spec.ts
e2e/CI: dual-engine suites, per-engine screenshots, SwiftShader retired, prod web suite, CI-coverage gate
2026-07-17 12:21:54 +02:00
dataview.spec.ts
test(determinism): deterministic waits + stableShot screenshots; drop blind sleeps/ifs/retries
2026-07-07 10:50:24 +02:00
dataviewvirtual.spec.ts
test(determinism): deterministic waits + stableShot screenshots; drop blind sleeps/ifs/retries
2026-07-07 10:50:24 +02:00
dialog.spec.ts
test(determinism): deterministic waits + stableShot screenshots; drop blind sleeps/ifs/retries
2026-07-07 10:50:24 +02:00
dialogs.spec.ts
test(screenshots): restore screenshot-neutrality after the determinism refactor
2026-07-07 11:35:39 +02:00
dnd.spec.ts
test(determinism): deterministic waits + stableShot screenshots; drop blind sleeps/ifs/retries
2026-07-07 10:50:24 +02:00
dom-port-bugs.spec.ts
fix: 🐛 tooltip + test cases
2026-06-19 14:32:09 +02:00
earlysize.spec.ts
test(determinism): deterministic waits + stableShot screenshots; drop blind sleeps/ifs/retries
2026-07-07 10:50:24 +02:00
filedialog-folder-nav.spec.ts
test(determinism): deterministic waits + stableShot screenshots; drop blind sleeps/ifs/retries
2026-07-07 10:50:24 +02:00
filedialog.spec.ts
test(determinism): deterministic waits + stableShot screenshots; drop blind sleeps/ifs/retries
2026-07-07 10:50:24 +02:00
fontenum.spec.ts
test(determinism): deterministic waits + stableShot screenshots; drop blind sleeps/ifs/retries
2026-07-07 10:50:24 +02:00
gal-webgl.spec.ts
test(determinism): deterministic waits + stableShot screenshots; drop blind sleeps/ifs/retries
2026-07-07 10:50:24 +02:00
grid.spec.ts
test(screenshots): restore screenshot-neutrality after the determinism refactor
2026-07-07 11:35:39 +02:00
gridedit.spec.ts
test(determinism): deterministic waits + stableShot screenshots; drop blind sleeps/ifs/retries
2026-07-07 10:50:24 +02:00
gridrenderers.spec.ts
test(determinism): deterministic waits + stableShot screenshots; drop blind sleeps/ifs/retries
2026-07-07 10:50:24 +02:00
htmlwin.spec.ts
test(determinism): deterministic waits + stableShot screenshots; drop blind sleeps/ifs/retries
2026-07-07 10:50:24 +02:00
infobar.spec.ts
test(determinism): deterministic waits + stableShot screenshots; drop blind sleeps/ifs/retries
2026-07-07 10:50:24 +02:00
layout.spec.ts
test(determinism): deterministic waits + stableShot screenshots; drop blind sleeps/ifs/retries
2026-07-07 10:50:24 +02:00
listctrl.spec.ts
test(determinism): deterministic waits + stableShot screenshots; drop blind sleeps/ifs/retries
2026-07-07 10:50:24 +02:00
logerror.spec.ts
test(determinism): deterministic waits + stableShot screenshots; drop blind sleeps/ifs/retries
2026-07-07 10:50:24 +02:00
maximize.spec.ts
test(determinism): deterministic waits + stableShot screenshots; drop blind sleeps/ifs/retries
2026-07-07 10:50:24 +02:00
menu.spec.ts
test(determinism): deterministic waits + stableShot screenshots; drop blind sleeps/ifs/retries
2026-07-07 10:50:24 +02:00
modal.spec.ts
test(determinism): deterministic waits + stableShot screenshots; drop blind sleeps/ifs/retries
2026-07-07 10:50:24 +02:00
notebook.spec.ts
test(determinism): deterministic waits + stableShot screenshots; drop blind sleeps/ifs/retries
2026-07-07 10:50:24 +02:00
ownerdrawn.spec.ts
test(determinism): deterministic waits + stableShot screenshots; drop blind sleeps/ifs/retries
2026-07-07 10:50:24 +02:00
pickers.spec.ts
test(determinism): deterministic waits + stableShot screenshots; drop blind sleeps/ifs/retries
2026-07-07 10:50:24 +02:00
popup.spec.ts
test(determinism): deterministic waits + stableShot screenshots; drop blind sleeps/ifs/retries
2026-07-07 10:50:24 +02:00
print.spec.ts
test(determinism): deterministic waits + stableShot screenshots; drop blind sleeps/ifs/retries
2026-07-07 10:50:24 +02:00
printpreview.spec.ts
test(determinism): deterministic waits + stableShot screenshots; drop blind sleeps/ifs/retries
2026-07-07 10:50:24 +02:00
propgrid.spec.ts
test(determinism): deterministic waits + stableShot screenshots; drop blind sleeps/ifs/retries
2026-07-07 10:50:24 +02:00
radiogroups.spec.ts
test(determinism): deterministic waits + stableShot screenshots; drop blind sleeps/ifs/retries
2026-07-07 10:50:24 +02:00
regions.spec.ts
test(determinism): deterministic waits + stableShot screenshots; drop blind sleeps/ifs/retries
2026-07-07 10:50:24 +02:00
retinascale.spec.ts
e2e/CI: dual-engine suites, per-engine screenshots, SwiftShader retired, prod web suite, CI-coverage gate
2026-07-17 12:21:54 +02:00
scrollbar.spec.ts
test(determinism): deterministic waits + stableShot screenshots; drop blind sleeps/ifs/retries
2026-07-07 10:50:24 +02:00
secondary-frame-chrome.spec.ts
test(determinism): deterministic waits + stableShot screenshots; drop blind sleeps/ifs/retries
2026-07-07 10:50:24 +02:00
secondary-glcanvas.spec.ts
test: 💍 wxWidgets secondary canvas
2026-06-19 09:22:58 +02:00
selectheight.spec.ts
test(determinism): deterministic waits + stableShot screenshots; drop blind sleeps/ifs/retries
2026-07-07 10:50:24 +02:00
specialized.spec.ts
test(determinism): deterministic waits + stableShot screenshots; drop blind sleeps/ifs/retries
2026-07-07 10:50:24 +02:00
stc.spec.ts
test(determinism): deterministic waits + stableShot screenshots; drop blind sleeps/ifs/retries
2026-07-07 10:50:24 +02:00
textdecor.spec.ts
test(determinism): deterministic waits + stableShot screenshots; drop blind sleeps/ifs/retries
2026-07-07 10:50:24 +02:00
threadpool.spec.ts
e2e/CI: dual-engine suites, per-engine screenshots, SwiftShader retired, prod web suite, CI-coverage gate
2026-07-17 12:21:54 +02:00
timer.spec.ts
test(screenshots): restore screenshot-neutrality after the determinism refactor
2026-07-07 11:35:39 +02:00
toolbar.spec.ts
test(determinism): deterministic waits + stableShot screenshots; drop blind sleeps/ifs/retries
2026-07-07 10:50:24 +02:00
tree.spec.ts
test(determinism): deterministic waits + stableShot screenshots; drop blind sleeps/ifs/retries
2026-07-07 10:50:24 +02:00
validators.spec.ts
test(determinism): deterministic waits + stableShot screenshots; drop blind sleeps/ifs/retries
2026-07-07 10:50:24 +02:00
warp-pointer.spec.ts
fix: 🐛 press m & move w/ arrows
2026-06-16 15:46:43 +02:00
wasmedge.spec.ts
test(determinism): deterministic waits + stableShot screenshots; drop blind sleeps/ifs/retries
2026-07-07 10:50:24 +02:00
wizard.spec.ts
test(determinism): deterministic waits + stableShot screenshots; drop blind sleeps/ifs/retries
2026-07-07 10:50:24 +02:00
wxwidgets.spec.ts
e2e/CI: dual-engine suites, per-engine screenshots, SwiftShader retired, prod web suite, CI-coverage gate
2026-07-17 12:21:54 +02:00
xml.spec.ts
test(determinism): deterministic waits + stableShot screenshots; drop blind sleeps/ifs/retries
2026-07-07 10:50:24 +02:00