[PATCH] D34827: Add end-to-end tests for overflows of byval arguments.

Vitaly Buka via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 29 12:16:02 PDT 2017


vitalybuka added a comment.

Probably we need test for UAR as well

A* f(A a) {

  return &a;

}

viod b() {

  A* a = f(A());
  a->  // should likely crash with UAR and pass without it

}



================
Comment at: test/asan/TestCases/pass-struct-byval.cc:1
+// RUN: %clangxx_asan -O0 %s -o %t
+// RUN: not %run %t 2>&1 | FileCheck %s
----------------
what is going to happen with -O1?


https://reviews.llvm.org/D34827





More information about the llvm-commits mailing list