summaryrefslogtreecommitdiff
path: root/android/variable.go
diff options
context:
space:
mode:
author Evgenii Stepanov <eugenis@google.com> 2020-04-29 14:57:30 -0700
committer Evgenii Stepanov <eugenis@google.com> 2020-04-29 15:33:07 -0700
commit19ff3c9bb83445c43e0b4891ae9e90443f8b2e33 (patch)
tree1cf8505ad680a9234a956ac861d05cd97e5cb06a /android/variable.go
parent0b3b3db525f7ce236dcaece80ee93048d21536ab (diff)
[soong] Zero and pattern initialization of heap memory.
Bug: 155227507 Test: build with and without MALLOC_PATTERN_FILL_CONTENTS, MALLOC_ZERO_CONTENTS Change-Id: I79a675e1b20897e8f88e89b1b2d6758e8b91f0be
Diffstat (limited to 'android/variable.go')
-rw-r--r--android/variable.go16
1 files changed, 14 insertions, 2 deletions
diff --git a/android/variable.go b/android/variable.go
index 3b3916e2f..3c08405dd 100644
--- a/android/variable.go
+++ b/android/variable.go
@@ -49,6 +49,14 @@ type variableProperties struct {
Exclude_static_libs []string `android:"arch_variant"`
} `android:"arch_variant"`
+ Malloc_zero_contents struct {
+ Cflags []string `android:"arch_variant"`
+ } `android:"arch_variant"`
+
+ Malloc_pattern_fill_contents struct {
+ Cflags []string `android:"arch_variant"`
+ } `android:"arch_variant"`
+
Safestack struct {
Cflags []string `android:"arch_variant"`
} `android:"arch_variant"`
@@ -210,6 +218,8 @@ type productVariables struct {
Unbundled_build *bool `json:",omitempty"`
Unbundled_build_sdks_from_source *bool `json:",omitempty"`
Malloc_not_svelte *bool `json:",omitempty"`
+ Malloc_zero_contents *bool `json:",omitempty"`
+ Malloc_pattern_fill_contents *bool `json:",omitempty"`
Safestack *bool `json:",omitempty"`
HostStaticBinaries *bool `json:",omitempty"`
Binder32bit *bool `json:",omitempty"`
@@ -376,8 +386,10 @@ func (v *productVariables) SetDefaultConfig() {
AAPTCharacteristics: stringPtr("nosdcard"),
AAPTPrebuiltDPI: []string{"xhdpi", "xxhdpi"},
- Malloc_not_svelte: boolPtr(true),
- Safestack: boolPtr(false),
+ Malloc_not_svelte: boolPtr(true),
+ Malloc_zero_contents: boolPtr(false),
+ Malloc_pattern_fill_contents: boolPtr(false),
+ Safestack: boolPtr(false),
}
if runtime.GOOS == "linux" {