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
[OptTable] Fix typo VALUE => VALUES (NFCI) (#121523)
[llvm-project.git]
/
compiler-rt
/
test
/
asan
/
TestCases
/
pass-struct-byval.cpp
blob
ba49eccf41cab57719db656e27fb512e72505c56
1
// RUN: %clangxx_asan -O0 %s -o %t
2
// RUN: not %run %t 2>&1 | FileCheck %s
3
4
struct
A
{
5
int
a
[
8
];
6
};
7
8
int
bar
(
A
*
a
) {
9
int
*
volatile
ptr
= &
a
->
a
[
0
];
10
return
*(
ptr
-
1
);
11
}
12
13
void
foo
(
A a
) {
14
bar
(&
a
);
15
}
16
17
int
main
() {
18
foo
(
A
());
19
}
20
21
// CHECK: ERROR: AddressSanitizer: stack-buffer-underflow
22
// CHECK: READ of size 4 at
23
// CHECK: is located in stack of thread