r368690 - [AIX][test/Index] Set/propagate AIXTHREAD_STK for AIX

Hubert Tong via cfe-commits cfe-commits at lists.llvm.org
Tue Aug 13 06:38:15 PDT 2019


Author: hubert.reinterpretcast
Date: Tue Aug 13 06:38:15 2019
New Revision: 368690

URL: http://llvm.org/viewvc/llvm-project?rev=368690&view=rev
Log:
[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

Added:
    cfe/trunk/test/Index/lit.local.cfg

Added: cfe/trunk/test/Index/lit.local.cfg
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Index/lit.local.cfg?rev=368690&view=auto
==============================================================================
--- cfe/trunk/test/Index/lit.local.cfg (added)
+++ cfe/trunk/test/Index/lit.local.cfg Tue Aug 13 06:38:15 2019
@@ -0,0 +1,12 @@
+import platform
+
+# 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. Various applications and runtime
+# libraries on AIX use a default pthread stack size of 4 MiB, so we will use
+# that as a default value here.
+if 'AIXTHREAD_STK' in os.environ:
+    config.environment['AIXTHREAD_STK'] = os.environ['AIXTHREAD_STK']
+elif platform.system() == 'AIX':
+    config.environment['AIXTHREAD_STK'] = '4194304'




More information about the cfe-commits mailing list