[PATCH] D65688: [AIX][test/Index] Set/propagate AIXTHREAD_STK for AIX
Hubert Tong via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Aug 2 17:58:07 PDT 2019
hubert.reinterpretcast created this revision.
hubert.reinterpretcast added reviewers: xingxue, daltenty, jasonliu.
Herald added subscribers: jfb, arphaman.
Herald added a project: clang.
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.
@@ -0,0 +1,12 @@
+# 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'
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 802 bytes
Desc: not available
More information about the cfe-commits