Skip to content

Share dual-SONAME nix preload and fail rewrite-only browser crashes - #3

Merged
tyler274 merged 1 commit into
main3from
rewrite/browser-preload-judge
Nov 28, 2026
Merged

tyler274 merged 1 commit into
main3from
rewrite/browser-preload-judge

Conversation

@tyler274

Copy link
Copy Markdown
Owner

Summary

  • New nixpreload.rs used by browsers, world and projects: lists both libmimalloc.so and libmimalloc-secure.so.3, binds /etc/ld-nix.so.preload and /etc/static/ld-nix.so.preload.
  • judge: a rewrite failure is excused only if the C oracle ran and failed the same way; C mimalloc mapped beside the rewrite fails. Failures write diag.txt (maps, exit/signal, stderr tail, backtrace).
  • browsers.nix fails rewrite-only crashes; Firefox profile dirs, Electron headless ozone.
  • Firejail firefox is unwrapped (it blocked the preload file, so Firefox never loaded the rewrite).
  • World: KWin probe drops --lock (rejected by KWin 6.8.2); plasmashell:scripted-panel builds a real panel in a nested KWin session; non-native (32-bit) binaries skipped.

Testing

Verified locally (Rust 1.99.1): cargo test -p elymalloc-core --release (117/117) and -p elymalloc-harness pass on this branch alone. Firefox, Chromium, Electron pass under libc, rewrite and C mimalloc (12-run loop, normal and secure). World 40/40. A crashing fake DSO fails both the harness and the derivation.

Move preload helpers into nixpreload.rs (both libmimalloc.so and
libmimalloc-secure.so.3, both ld-nix.so.preload paths) for browsers,
world and projects. Only excuse a rewrite failure when the C oracle ran
and failed the same way, save maps/backtraces on failure, make
browsers.nix fail rewrite-only crashes, unwrap firejail firefox, and
turn the KWin/plasmashell probes into real workloads.
@tyler274
tyler274 merged commit 477b05e into main3 Nov 28, 2026
5 of 7 checks passed
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.

1 participant