This is an archive of the discontinued LLVM Phabricator instance.

[asan] Don't poison variables for lifitime analysis on function entry
AbandonedPublic

Authored by vitalybuka on Sep 12 2016, 4:48 PM.

Details

Reviewers
None
Summary

In most cases such poisoning makes sense, however PR28267 allows to jump over
intrinsic.

void f2(int cond) {
     switch (cond) {
       case 1: {
         ++cond;
         int tmp = 1;
         ptr = &tmp;
         exit(0);
       case 2:
         ptr = &tmp;
         *ptr = 5;
         exit(0);
       }
     }
   }

Diff Detail

Event Timeline

vitalybuka updated this revision to Diff 71077.Sep 12 2016, 4:48 PM
vitalybuka retitled this revision from to [asan] Don't poison variables as for lifitime analysis on function entry..
vitalybuka updated this object.
vitalybuka added a reviewer: eugenis.
vitalybuka added a subscriber: llvm-commits.
vitalybuka updated this revision to Diff 71081.Sep 12 2016, 5:06 PM

Fixed test

eugenis added inline comments.Sep 12 2016, 6:24 PM
lib/Transforms/Instrumentation/AddressSanitizer.cpp
2388

functions

vitalybuka updated this revision to Diff 71091.Sep 12 2016, 6:48 PM

relaxed AllocaLifetimeChecker
check only successors of lifetime markers, no entry

vitalybuka updated this revision to Diff 71093.Sep 12 2016, 6:51 PM

Description

vitalybuka retitled this revision from [asan] Don't poison variables as for lifitime analysis on function entry. to [asan] Don't poison variables for lifitime analysis on function entry.Sep 12 2016, 6:51 PM
vitalybuka updated this object.
vitalybuka updated this object.
vitalybuka updated this object.
vitalybuka abandoned this revision.Sep 16 2016, 6:06 PM