mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-05-10 17:12:41 +02:00
This keeps our Rust crates on the same allocator in shared builds. This fixes the same ELF debug crash as #9026, where mimalloc detects heap corruption as soon as liblagom-regex.so starts using the first allocator it finds. When generating liblagom-regex.so during shared-library linkage, the normal linker sees that those allocator symbols are already provided by liblagom-unicode.so, which it depends on, so the corresponding object file is not pulled in from libregex_rust.a. Fast forward to runtime, if liblagom-gfx.so is loaded first, as seems to happen in debug builds, then its exported allocator is picked up by liblagom-regex.so instead.