sanmd: improve precision of UAR analysis
authorDmitry Vyukov <dvyukov@google.com>
Sun, 11 Dec 2022 09:37:46 +0000 (10:37 +0100)
committerDmitry Vyukov <dvyukov@google.com>
Mon, 12 Dec 2022 10:41:59 +0000 (11:41 +0100)
commit5addb736a9a8fd669c5daa80bd98e8d73b584e73
treed3ab5d5e35db3ada47998a69d09f07bba05feb01
parent6cf7f32ab5bc0ace281c8fa92b0b217be6aad07e
sanmd: improve precision of UAR analysis

Only mark functions that have address-taken locals
as requiring UAR checking.

On a large internal app this reduces number of marked functions
from 78441 to 66618. Mostly small, trivial getter/setter-type
functions are unmarked, but also some amount of larger
number-crunching-type functions are unmarked as well.

Reviewed By: melver

Differential Revision: https://reviews.llvm.org/D139811
compiler-rt/test/metadata/covered.cpp
compiler-rt/test/metadata/uar.cpp
llvm/lib/Transforms/Instrumentation/SanitizerBinaryMetadata.cpp