-
-
Notifications
You must be signed in to change notification settings - Fork 128
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
Support configurable stack size #1082
Comments
Generally stack size is configurable at time of compilation so can you not change the compile command to suit your need? It should work for MinGW in Windows. |
|
Adding |
@StupidQu correct, we spawn your code as child process with There are two ways to increase stack size for your program:
#include <iostream>
#include <sys/resource.h>
int main() {
struct rlimit rl;
rl.rlim_cur = RLIM_INFINITY; // Set soft limit to unlimited
rl.rlim_max = RLIM_INFINITY; // Set hard limit to unlimited
if (setrlimit(RLIMIT_STACK, &rl) != 0) {
perror("setrlimit");
return 1;
}
// Your program logic here
return 0;
} |
Is there an existing issue for this?
Is this feature provided in the master branch?
The problem you are facing
The code below will receive RE locally due to stack size limit.
Though we can use other methods to solve it, like using
setrlimit
system call on Linux to acquire a bigger stack mannually, I think it will be better if cpeditor can support configuable stack size.Describe the feature you'd like
Support configurable stack size.
Describe alternatives you've considered
No response
Are you willing to contribute to this?
Anything else?
No response
The text was updated successfully, but these errors were encountered: