Commit 10f5e7cf authored by ishell@chromium.org's avatar ishell@chromium.org Committed by Commit Bot

[ptr-compr] Fix false positive memory leak reports

... by adding use_unaligned=1 to default LSAN_OPTIONS.

With pointer compression in V8 the external pointers from V8 heap
are guaranteed to be only 4-byte aligned so without this flag
LSAN is not able to find all the external pointers.

Bug: chromium:328552
Change-Id: I4bb7eb68d023ae4fb4324cf13d317e3ee011669d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1926472Reviewed-by: default avatarAbhishek Arya <inferno@chromium.org>
Commit-Queue: Igor Sheludko <ishell@chromium.org>
Cr-Commit-Position: refs/heads/master@{#718488}
parent 8d5a4c8c
......@@ -130,7 +130,15 @@ SANITIZER_HOOK_ATTRIBUTE const char *__msan_default_options() {
// strip_path_prefix=/../../ - prefixes up to and including this
// substring will be stripped from source file paths in symbolized reports.
const char kLsanDefaultOptions[] =
"print_suppressions=1 strip_path_prefix=/../../ ";
"print_suppressions=1 strip_path_prefix=/../../ "
#if defined(ARCH_CPU_64_BITS)
// When pointer compression in V8 is enabled the external pointers in the
// heap are guaranteed to be only 4 bytes aligned. So we need this option
// in order to ensure that LSAN will find all the external pointers.
// TODO(crbug.com/328552): see updates from 2019.
"use_unaligned=1 "
#endif // ARCH_CPU_64_BITS
;
SANITIZER_HOOK_ATTRIBUTE const char *__lsan_default_options() {
return kLsanDefaultOptions;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment