[asan] Avoid lifetime analysis for allocas with can be in ambiguous state
authorVitaly Buka <vitalybuka@google.com>
Thu, 8 Sep 2016 06:27:58 +0000 (06:27 +0000)
committerVitaly Buka <vitalybuka@google.com>
Thu, 8 Sep 2016 06:27:58 +0000 (06:27 +0000)
commit58a81c6540d69ff8e5244256f85315be266fd233
tree1db974fb4bdab4328403350d07b151a99464dd96
parent0b4c26b2cca5e91c1c46661f850ef58331461f91
[asan] Avoid lifetime analysis for allocas with can be in ambiguous state

Summary:
C allows to jump over variables declaration so lifetime.start can be
avoid before variable usage. To avoid false-positives on such rare cases
we detect them and remove from lifetime analysis.

PR27453
PR28267

Reviewers: eugenis

Subscribers: llvm-commits

Differential Revision: https://reviews.llvm.org/D24321

llvm-svn: 280907
llvm/lib/Transforms/Instrumentation/AddressSanitizer.cpp
llvm/test/Instrumentation/AddressSanitizer/lifetime.ll