diff options
author | Peter Collingbourne <peter@pcc.me.uk> | 2014-10-30 13:23:01 +0000 |
---|---|---|
committer | Peter Collingbourne <peter@pcc.me.uk> | 2014-10-30 13:23:01 +0000 |
commit | d68f126cf8b0ce0d5f741ee133f9c3b9e6aee89e (patch) | |
tree | 0103a27da0f0d816b4bddb7e4d070f5d2d8849ef /test/dfsan | |
parent | 208eae32d1c92404668732216d429331c1aa6950 (diff) | |
download | compiler-rt-d68f126cf8b0ce0d5f741ee133f9c3b9e6aee89e.tar.gz |
Update __dfsw_s{,n}printf custom functions for new calling convention.
Differential Revision: http://reviews.llvm.org/D6029
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@220907 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/dfsan')
-rw-r--r-- | test/dfsan/custom.cc | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/test/dfsan/custom.cc b/test/dfsan/custom.cc index 8a49c32a0..d7bb3e307 100644 --- a/test/dfsan/custom.cc +++ b/test/dfsan/custom.cc @@ -813,6 +813,11 @@ void test_sprintf() { assert(strcmp(buf, "Hello world!") == 0); ASSERT_READ_LABEL(buf, sizeof(buf), 0); + // Test for extra arguments. + assert(sprintf(buf, "Hello world!", 42, "hello") == 12); + assert(strcmp(buf, "Hello world!") == 0); + ASSERT_READ_LABEL(buf, sizeof(buf), 0); + // Test formatting & label propagation (multiple conversion specifiers): %s, // %d, %n, %f, and %%. const char* s = "world"; |