google / google/tcmalloc

GWP-ASan guarded allocation size limitation

Open
#147 2 comments 1 reaction 0 assignees View on GitHub
Dominant language
C++
Stars
5.3k
Forks
570
Avg merge
23h 43m
Merged PRs (30d)
172

Description

Hi!

From what I see in the [implementation](https://github.com/google/tcmalloc/blob/97be09dbeb513355d42c23352f99a02302fac939/tcmalloc/allocation_sampling.h#L98) and in the [documentation](https://google.github.io/tcmalloc/gwp-asan.html#limitations), allocations consisting of more than a single page are not sampled, and therefore are not subject to address sanitizing.

Such limitation contradicts my intuition. Aren't smaller allocations the ones that introduce relatively larger amount of CPU & RAM overhead for guarding? Why is allocation of, let's say, 1 MiB expensive? Doesn't it require only two extra fence pages?

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.