[cfe-commits] r147570 - /cfe/trunk/test/Analysis/taint-tester.c
Anna Zaks
ganna at apple.com
Wed Jan 4 15:54:04 PST 2012
Author: zaks
Date: Wed Jan 4 17:54:04 2012
New Revision: 147570
URL: http://llvm.org/viewvc/llvm-project?rev=147570&view=rev
Log:
[analyzer] Add another tests to taint tester.
Modified:
cfe/trunk/test/Analysis/taint-tester.c
Modified: cfe/trunk/test/Analysis/taint-tester.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Analysis/taint-tester.c?rev=147570&r1=147569&r2=147570&view=diff
==============================================================================
--- cfe/trunk/test/Analysis/taint-tester.c (original)
+++ cfe/trunk/test/Analysis/taint-tester.c Wed Jan 4 17:54:04 2012
@@ -151,6 +151,15 @@
int jjj = iii;// expected-warning + {{tainted}}
}
+// Test that stdin does not get invalidated by calls.
+void foo();
+void stdinTest4() {
+ int i;
+ fscanf(stdin, "%d", &i);
+ foo();
+ int j = i; // expected-warning + {{tainted}}
+}
+
// Test propagation functions - the ones that propagate taint from arguments to
// return value, ptr arguments.
More information about the cfe-commits
mailing list