mirror of
https://github.com/GrapheneOS/hardened_malloc.git
synced 2025-11-22 20:50:29 -05:00
Merge 96836f463b into a000fd4b5e
This commit is contained in:
commit
622b2fbb4a
3 changed files with 24 additions and 0 deletions
|
|
@ -1295,7 +1295,12 @@ COLD static void init_slow_path(void) {
|
|||
|
||||
atomic_store_explicit(&ro.slab_region_end, slab_region_end, memory_order_release);
|
||||
|
||||
#if defined(__ANDROID__) && defined(HAS_ARM_MTE)
|
||||
/* Do not seal to support disabling memory tagging */
|
||||
if (unlikely(memory_protect_ro(&ro, sizeof(ro)))) {
|
||||
#else
|
||||
if (unlikely(memory_protect_seal(&ro, sizeof(ro)))) {
|
||||
#endif
|
||||
fatal_error("failed to protect allocator data");
|
||||
}
|
||||
memory_set_name(&ro, sizeof(ro), "malloc read-only after init");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue