This is an archive of the discontinued LLVM Phabricator instance.

[AIX][clang/test] Set/propagate AIXTHREAD_STK for AIX
ClosedPublic

Authored by hubert.reinterpretcast on Jul 5 2022, 3:46 PM.

Details

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.

This patch expands the solution from D65688 to apply to all Clang LIT
tests.

This also reverts commit c3c75d805c2174388417080f762230961b3433d6,
"[clang][test] Mark test arm-float-abi-lto.c unsupported on AIX".

The problem was caused by the test running up against the per-thread
stack limit on AIX. This is resolved by having the tests run with
AIXTHREAD_STK set for 4 MiB.

Diff Detail

Event Timeline

Herald added a project: Restricted Project. · View Herald TranscriptJul 5 2022, 3:46 PM
hubert.reinterpretcast requested review of this revision.Jul 5 2022, 3:46 PM
Herald added a project: Restricted Project. · View Herald TranscriptJul 5 2022, 3:46 PM
xingxue accepted this revision.Jul 5 2022, 5:14 PM

LGTM; thanks! The IBM OpenMP runtime sets the default thread stack size to 4MiB on AIX as well.

This revision is now accepted and ready to land.Jul 5 2022, 5:14 PM