-
Notifications
You must be signed in to change notification settings - Fork 10.5k
Increase the stack size limit for running llvm codegen threads to 8MB #23102
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Increase the stack size limit for running llvm codegen threads to 8MB #23102
Conversation
Without this compilation may fail in llvm because we run out of stack space. The limit for the main thread is 8MB on mac osx but 512KB for other threads. rdar://47787344
@swift-ci Please test |
Build failed |
Did we run out of disk space ...
|
@swift-ci Please smoke test OS X platform |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this relevant on Linux too?
pthread_attr_destroy(&stackSizeAttribute); | ||
#else | ||
for (auto &thread : threads) { | ||
thread.thread = new std::thread(runThread, &thread); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why does it need to be heap-allocated?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It does not.
#23214
The default stack size for pthread_create on linux is not as low as on Mac OS: 2MB not 512Kb. We could also increase this to 8MB. |
Is this shipped with latest xcode 10.2 ? |
My problem was Cache library i used : hyperoslo/Cache#238 |
This would not have made it into Xcode 10.2, sorry! |
Without this compilation may fail in llvm because we run out of stack space. The
limit for the main thread is 8MB on mac osx but 512KB for other threads.
rdar://47787344