Skip to content

Commit f635e28

Browse files
[AIX][test/Index] Set/propagate AIXTHREAD_STK for AIX
Summary: Some tests perform deep recursion, which requires a larger pthread stack size than the relatively low default of 192 KiB for 64-bit processes on AIX. The `AIXTHREAD_STK` environment variable provides a non-intrusive way to request a larger pthread stack size for the tests. The required pthread stack size depends on the build configuration. A 4 MiB default is generous compared to the 512 KiB of macOS; however, it is known that some compilers on AIX produce code that uses comparatively more stack space. Reviewers: xingxue, daltenty, jasonliu Reviewed By: daltenty Subscribers: arphaman, jfb, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D65688 llvm-svn: 368690
1 parent b9bd6eb commit f635e28

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

clang/test/Index/lit.local.cfg

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
import platform
2+
3+
# Some tests perform deep recursion, which requires a larger pthread stack size
4+
# than the relatively low default of 192 KiB for 64-bit processes on AIX. The
5+
# `AIXTHREAD_STK` environment variable provides a non-intrusive way to request
6+
# a larger pthread stack size for the tests. Various applications and runtime
7+
# libraries on AIX use a default pthread stack size of 4 MiB, so we will use
8+
# that as a default value here.
9+
if 'AIXTHREAD_STK' in os.environ:
10+
config.environment['AIXTHREAD_STK'] = os.environ['AIXTHREAD_STK']
11+
elif platform.system() == 'AIX':
12+
config.environment['AIXTHREAD_STK'] = '4194304'

0 commit comments

Comments
 (0)