Commit f9b80ed7 authored by Leonard Chan's avatar Leonard Chan
Browse files

[compiler-rt] Add opt-in -ftrivial-auto-var-init flag for writing over...

[compiler-rt] Add opt-in -ftrivial-auto-var-init flag for writing over uninitialized stack variiables

This might allow lsan to find more leaks that would have gone
undetected. When lsan searches for leaked pointers on the stack, if a
leaked pointer that was pushed to the stack in a prior function call
would not be scrubbed on a future function call, then the scan will see
the pointer on the stack and not mark it as leaked. Such holes can exist
in the lsan runtime where there may be uninitialized data. Adding
auto-var-init can scrub some of that data and might be able to catch
more leaks that would've gone undetected this way.

See https://bugs.fuchsia.dev/p/fuchsia/issues/detail?id=111351 for more
details.

Differential Revision: https://reviews.llvm.org/D135716
parent 32cc7d34
Supports Markdown
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