Bug 1917844 - Assert correct jemalloc randomization state on Content and non Content processes r=jld,glandium

Differential Revision: https://phabricator.services.mozilla.com/D221971
This commit is contained in:
Alexandre Lissy
2024-10-16 20:10:55 +00:00
parent aebcff42c3
commit 7af8ad1bff
4 changed files with 28 additions and 12 deletions

View File

@@ -804,6 +804,13 @@ void ContentChild::Init(mozilla::ipc::UntypedEndpoint&& aEndpoint,
PendingInputEventHangAnnotator::sSingleton);
}));
#endif
#if defined(MOZ_MEMORY) && defined(DEBUG)
jemalloc_stats_t stats;
jemalloc_stats(&stats);
MOZ_ASSERT(!stats.opt_randomize_small,
"Content process should not randomize small allocations");
#endif
}
void ContentChild::AddProfileToProcessName(const nsACString& aProfile) {