Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 19ff3c9b authored by Evgenii Stepanov's avatar Evgenii Stepanov
Browse files

[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
parent 0b3b3db5
Loading
Loading
Loading
Loading
+14 −2
Original line number Diff line number Diff line
@@ -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"`
@@ -377,6 +387,8 @@ func (v *productVariables) SetDefaultConfig() {
		AAPTPrebuiltDPI:     []string{"xhdpi", "xxhdpi"},

		Malloc_not_svelte:            boolPtr(true),
		Malloc_zero_contents:         boolPtr(false),
		Malloc_pattern_fill_contents: boolPtr(false),
		Safestack:                    boolPtr(false),
	}