repo.or.cz
/
llvm-project.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
[clang] Add tracking source deduction guide for the explicitly-written
[llvm-project.git]
/
compiler-rt
/
test
/
asan
/
TestCases
/
Windows
/
msvc
/
strdup_null_input.cpp
blob
9fd34fe9a08dd107543e5de90a3b45690bcacc59
1
// RUN: %clang_cl_asan %s -Fe%t.exe
2
// RUN: %run %t.exe | FileCheck %s
3
4
// CHECK: Success
5
6
#include <malloc.h>
7
#include <stdio.h>
8
#include <string.h>
9
10
int
main
() {
11
// Null input is valid to strdup on Windows.
12
char
*
nullStr
=
_strdup
(
nullptr
);
13
free
(
nullStr
);
14
puts
(
"Success"
);
15
return
0
;
16
}