[llvm-commits] [compiler-rt] r145739 - /compiler-rt/trunk/lib/asan/tests/asan_benchmarks_test.cc
Kostya Serebryany
kcc at google.com
Fri Dec 2 17:44:48 PST 2011
Author: kcc
Date: Fri Dec 2 19:44:48 2011
New Revision: 145739
URL: http://llvm.org/viewvc/llvm-project?rev=145739&view=rev
Log:
[asan] micro-benchmark for use-after-return fake stack
Modified:
compiler-rt/trunk/lib/asan/tests/asan_benchmarks_test.cc
Modified: compiler-rt/trunk/lib/asan/tests/asan_benchmarks_test.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/asan/tests/asan_benchmarks_test.cc?rev=145739&r1=145738&r2=145739&view=diff
==============================================================================
--- compiler-rt/trunk/lib/asan/tests/asan_benchmarks_test.cc (original)
+++ compiler-rt/trunk/lib/asan/tests/asan_benchmarks_test.cc Fri Dec 2 19:44:48 2011
@@ -70,6 +70,15 @@
delete [] char_7_array;
}
+static void FunctionWithLargeStack() {
+ int stack[1000];
+ Ident(stack);
+}
+
+TEST(AddressSanitizer, FakeStackBenchmark) {
+ for (int i = 0; i < 10000000; i++)
+ Ident(&FunctionWithLargeStack)();
+}
int main(int argc, char **argv) {
testing::InitGoogleTest(&argc, argv);
More information about the llvm-commits
mailing list