diff options
author | 2025-02-19 21:19:48 +0000 | |
---|---|---|
committer | 2025-02-19 23:24:15 +0000 | |
commit | ee712c170cdd7c25de63209705e574e653b8ef4e (patch) | |
tree | 2448551dfa0be5f1d9ddf1a0e9dcb9f31a98ee48 /runtime/runtime.cc | |
parent | 50f41ab016288e44e70689d6ed60e38f749c59e2 (diff) |
Temporarily enable post-gc heap verification
This is to capture extra information for memory corruption crashes
observed with generational CMC. Since the crashes are mostly on x86_64
cuttlefish, we target only those.
The CL will be reverted within 1-2 days after few crash reports are
available.
Bug: 397381582
Test: ATP test-infra
Change-Id: I0de5d72a6cd8952c0524b3562e87cdf83e0c5be3
Diffstat (limited to 'runtime/runtime.cc')
-rw-r--r-- | runtime/runtime.cc | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/runtime/runtime.cc b/runtime/runtime.cc index 23e06ab792..a1b77743cf 100644 --- a/runtime/runtime.cc +++ b/runtime/runtime.cc @@ -1790,6 +1790,9 @@ bool Runtime::Init(RuntimeArgumentMap&& runtime_options_in) { (gUseUserfaultfd ? BackgroundGcOption(gc::kCollectorTypeCMCBackground) : runtime_options.GetOrDefault(Opt::BackgroundGc)); + bool verify_post_gc_heap = xgc_option.verify_post_gc_heap_ && + (android::base::GetProperty("ro.build.type", "") != "user"); + heap_ = new gc::Heap(runtime_options.GetOrDefault(Opt::MemoryInitialSize), runtime_options.GetOrDefault(Opt::HeapGrowthLimit), runtime_options.GetOrDefault(Opt::HeapMinFree), @@ -1822,7 +1825,7 @@ bool Runtime::Init(RuntimeArgumentMap&& runtime_options_in) { runtime_options.GetOrDefault(Opt::UseTLAB), xgc_option.verify_pre_gc_heap_, xgc_option.verify_pre_sweeping_heap_, - xgc_option.verify_post_gc_heap_, + verify_post_gc_heap, xgc_option.verify_pre_gc_rosalloc_, xgc_option.verify_pre_sweeping_rosalloc_, xgc_option.verify_post_gc_rosalloc_, |