[compiler-rt] r344034 - Use PTHREAD_STACK_MIN conditionally in a test
Kamil Rytarowski via llvm-commits
llvm-commits at lists.llvm.org
Tue Oct 9 03:32:01 PDT 2018
Author: kamil
Date: Tue Oct 9 03:32:01 2018
New Revision: 344034
URL: http://llvm.org/viewvc/llvm-project?rev=344034&view=rev
Log:
Use PTHREAD_STACK_MIN conditionally in a test
PTHREAD_STACK_MIN is not available on NetBSD as it's not
clear what the value shall be represented by this constant
on a multiplatform OS.
Modified:
compiler-rt/trunk/test/asan/TestCases/Posix/stack-use-after-return.cc
Modified: compiler-rt/trunk/test/asan/TestCases/Posix/stack-use-after-return.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Posix/stack-use-after-return.cc?rev=344034&r1=344033&r2=344034&view=diff
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Posix/stack-use-after-return.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Posix/stack-use-after-return.cc Tue Oct 9 03:32:01 2018
@@ -78,9 +78,11 @@ int main(int argc, char **argv) {
pthread_attr_init(&attr);
if (kStackSize > 0) {
size_t desired_stack_size = kStackSize;
+#ifdef PTHREAD_STACK_MIN
if (desired_stack_size < PTHREAD_STACK_MIN) {
desired_stack_size = PTHREAD_STACK_MIN;
}
+#endif
int ret = pthread_attr_setstacksize(&attr, desired_stack_size);
if (ret != 0) {
More information about the llvm-commits
mailing list