[PATCH] D41222: Handle previously ASAN-instrumented IR gracefully when ASAN re-invoked

Vedant Kumar via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Dec 13 20:17:43 PST 2017


vsk added a comment.

Is it possible to reduce the test case s.t the test file doesn't contain instrumented IR? ASan instrumentation is prone to change, so I worry that the test could start passing for invalid reasons. This might happen if 1) __asan_before_dynamic_init is renamed, 2) GlobalsMetadata::doInit is written more defensively, and 3) a non-idempotent ASan transform is introduced later.

I envision something like:

  RUN: opt -asan -asan-module < %s -S -o %t.ll
  RUN: opt -asan -asan-module < %t.ll -S -o %t.2.ll
  RUN: diff %t.ll %t.2.ll

I spent a few minutes trying to come up with a test like this but did not succeed, because my test file didn't trip the assert you hit.


https://reviews.llvm.org/D41222





More information about the llvm-commits mailing list