Open Martmists-GH opened 1 year ago
What could be done here? Could mimalloc somehow handle the fact that some projects have their own malloc impls? eg. chromium uses PartitionAlloc and as far as I remember, hardened_malloc from GrapheneOS project works fine LD_PRELOAD'd with Chromium/Electron/Google Chrome.
@thestinger don't want to bother, but does hardened_malloc have some compatibility workarounds or is it simply compatible with what Chromium expects?
We don't have any compatibility workarounds at the moment. We have occasionally had to work around camera HAL memory corruption bugs on certain Pixel phones. Chromium works fine with hardened_malloc but it doesn't use malloc very much so it doesn't actually provide much hardening for it.
We recently added hardware memory tagging in hardened_malloc which is enabled by default on GrapheneOS. However, we need to also get it working via Chromium's support for it since having it only in hardened_malloc would accomplish very little for Chromium.
OS: Arch Linux
google-chrome
from AUR repo, version113.0.5672.126-1
mimalloc
from Extra repo, version2.1.2-1
output of
MIMALLOC_VERBOSE=1 LD_PRELOAD=/usr/lib/libmimalloc.so google-chrome-stable 2> verbose.log
Verbose output: verbose.log