forked from OSchip/llvm-project
[Tsan] Fix the global_race tests to pass on FreeBSD
Differential Revision: http://reviews.llvm.org/D5668 llvm-svn: 219398
This commit is contained in:
parent
27781f993d
commit
c2e274dc2c
|
@ -13,7 +13,9 @@ void *Thread(void *a) {
|
|||
}
|
||||
|
||||
int main() {
|
||||
fprintf(stderr, "addr=%p\n", GlobalData);
|
||||
// On FreeBSD, the %p conversion specifier works as 0x%x and thus does not
|
||||
// match to the format used in the diagnotic message.
|
||||
fprintf(stderr, "addr=0x%012lx\n", (unsigned long) GlobalData);
|
||||
pthread_t t;
|
||||
pthread_create(&t, 0, Thread, 0);
|
||||
GlobalData[2] = 43;
|
||||
|
|
|
@ -13,7 +13,9 @@ void *Thread(void *a) {
|
|||
}
|
||||
|
||||
int main() {
|
||||
fprintf(stderr, "addr2=%p\n", &x);
|
||||
// On FreeBSD, the %p conversion specifier works as 0x%x and thus does not
|
||||
// match to the format used in the diagnotic message.
|
||||
fprintf(stderr, "addr2=0x%012lx\n", (unsigned long) &x);
|
||||
pthread_t t;
|
||||
pthread_create(&t, 0, Thread, 0);
|
||||
x = 0;
|
||||
|
|
|
@ -18,7 +18,9 @@ void *Thread(void *a) {
|
|||
}
|
||||
|
||||
int main() {
|
||||
fprintf(stderr, "addr3=%p\n", XXX::YYY::ZZZ);
|
||||
// On FreeBSD, the %p conversion specifier works as 0x%x and thus does not
|
||||
// match to the format used in the diagnotic message.
|
||||
fprintf(stderr, "addr3=0x%012lx\n", (unsigned long) XXX::YYY::ZZZ);
|
||||
pthread_t t;
|
||||
pthread_create(&t, 0, Thread, 0);
|
||||
XXX::YYY::ZZZ[0] = 0;
|
||||
|
|
Loading…
Reference in New Issue