Merge "[GWP-ASan] Use recoverable everywhere" into main am: 4435aff516
Original change: https://android-review.googlesource.com/c/platform/bionic/+/3032165 Change-Id: I409b43a27ce65193cc3581ec73ea6955db363944 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
commit
860912ccf6
2 changed files with 11 additions and 7 deletions
|
@ -258,14 +258,14 @@ void SetDefaultGwpAsanOptions(Options* options, unsigned* process_sample_rate,
|
|||
options->Backtrace = android_unsafe_frame_pointer_chase;
|
||||
options->SampleRate = kDefaultSampleRate;
|
||||
options->MaxSimultaneousAllocations = kDefaultMaxAllocs;
|
||||
options->Recoverable = true;
|
||||
GwpAsanRecoverable = true;
|
||||
|
||||
*process_sample_rate = 1;
|
||||
if (mallopt_options.desire == Action::TURN_ON_WITH_SAMPLING) {
|
||||
if (mallopt_options.desire == Action::TURN_ON_WITH_SAMPLING ||
|
||||
mallopt_options.desire == Action::TURN_ON_FOR_APP_SAMPLED_NON_CRASHING) {
|
||||
*process_sample_rate = kDefaultProcessSampling;
|
||||
} else if (mallopt_options.desire == Action::TURN_ON_FOR_APP_SAMPLED_NON_CRASHING) {
|
||||
*process_sample_rate = kDefaultProcessSampling;
|
||||
options->Recoverable = true;
|
||||
GwpAsanRecoverable = true;
|
||||
} else {
|
||||
*process_sample_rate = 1;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -403,7 +403,7 @@ bool GetGwpAsanOptions(Options* options, unsigned* process_sample_rate,
|
|||
/* default */ kDefaultMaxAllocs / frequency_multiplier;
|
||||
}
|
||||
|
||||
bool recoverable = false;
|
||||
bool recoverable = true;
|
||||
if (GetGwpAsanBoolOption(&recoverable, mallopt_options, kRecoverableSystemSysprop,
|
||||
kRecoverableAppSysprop, kRecoverableTargetedSyspropPrefix,
|
||||
kRecoverableEnvVar, "recoverable")) {
|
||||
|
|
|
@ -152,6 +152,10 @@ typedef struct {
|
|||
// mode, and bug reports will be created by debuggerd, however the process
|
||||
// will recover and continue to function as if the memory safety bug wasn't
|
||||
// detected.
|
||||
//
|
||||
// In Android 15, this is the same as TURN_ON_WITH_SAMPLING, as GWP-ASan is
|
||||
// only ever used in non-crashing mode (even for platform executables and
|
||||
// system apps).
|
||||
TURN_ON_FOR_APP_SAMPLED_NON_CRASHING,
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in a new issue