forked from OSchip/llvm-project
[Asan] Fix the tsd_dtor_leak.cc test to pass on FreeBSD
Differential Revision: http://reviews.llvm.org/D6590 llvm-svn: 224116
This commit is contained in:
parent
1a53996c31
commit
df4dab69e2
|
@ -34,6 +34,13 @@ int main() {
|
|||
fprintf(stderr, "heap size: new: %zd old: %zd\n", new_heap_size, old_heap_size);
|
||||
if (old_heap_size)
|
||||
assert(old_heap_size == new_heap_size);
|
||||
#if defined(__FreeBSD__)
|
||||
// On FreeBSD SYSCALL(sched_yielld) allocates some more space during the
|
||||
// 2nd attempt.
|
||||
if (i > 0)
|
||||
old_heap_size = new_heap_size;
|
||||
#else
|
||||
old_heap_size = new_heap_size;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue