summaryrefslogtreecommitdiff
path: root/test/msan
diff options
context:
space:
mode:
authorAlexey Samsonov <vonosmas@gmail.com>2015-07-14 20:13:42 +0000
committerAlexey Samsonov <vonosmas@gmail.com>2015-07-14 20:13:42 +0000
commit1e52d788d5f5f284cf8806791c2eab0d01a187ba (patch)
tree137f230a55670978b2fb468cf7f761108d925838 /test/msan
parent8d00aa9bba354fd2c0fc6e93ebd4c149fd287c8a (diff)
[Sanitizer] Fix fopencookie() interceptor to work with null hook functions.
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@242193 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/msan')
-rw-r--r--test/msan/Linux/fopencookie.cc6
1 files changed, 6 insertions, 0 deletions
diff --git a/test/msan/Linux/fopencookie.cc b/test/msan/Linux/fopencookie.cc
index e9616d502..e5b8f936e 100644
--- a/test/msan/Linux/fopencookie.cc
+++ b/test/msan/Linux/fopencookie.cc
@@ -56,4 +56,10 @@ int main() {
fread(buf, 50, 1, f);
fwrite(buf, 50, 1, f);
fclose(f);
+
+ f = fopencookie(cookie, "rw", {nullptr, nullptr, nullptr, nullptr});
+ fseek(f, 100, SEEK_SET);
+ fread(buf, 50, 1, f);
+ fwrite(buf, 50, 1, f);
+ fclose(f);
}