Bug 1478143 - Adjust default malloc_context_size for ASan builds. r?froydnj
MozReview-Commit-ID: BbYWTtrsHLH
--- a/mozglue/build/AsanOptions.cpp
+++ b/mozglue/build/AsanOptions.cpp
@@ -43,18 +43,24 @@
// skipped.
//
// malloc_fill_byte / free_fill_byte - These values specify the byte values
// used to initialize/overwrite memory in conjunction with the previous
// options max_malloc_fill_size and max_free_fill_size. The values used here
// are 0xe4 and 0xe5 to match the kAllocPoison and kAllocJunk constants used
// by mozjemalloc.
//
+// malloc_context_size - This value specifies how many stack frames are
+// stored for each malloc and free call. Since Firefox can have lots of deep
+// stacks with allocations, we limit the default size here further to save
+// some memory.
+//
extern "C" MOZ_ASAN_BLACKLIST
const char* __asan_default_options() {
return "allow_user_segv_handler=1:alloc_dealloc_mismatch=0:detect_leaks=0"
+ ":malloc_context_size=20"
":max_free_fill_size=268435456:max_malloc_fill_size=268435456"
":malloc_fill_byte=228:free_fill_byte=229"
":handle_sigill=1"
":allocator_may_return_null=1";
}
#endif