diff options
author | Richard Henderson <rth@twiddle.net> | 2010-03-19 14:21:13 -0700 |
---|---|---|
committer | Aurelien Jarno <aurelien@aurel32.net> | 2010-03-27 14:16:51 +0100 |
commit | 703e0e89c669a70bbd6bf33c5e75f910d8d8cca3 (patch) | |
tree | 53180583a5e0d4f84fafb2ddee1de2ddb640ba6b /linux-user/elfload.c | |
parent | 3ad493fc5ea38c005670adc5933058a28ccabdd4 (diff) |
linux-user: Use RLIMIT_STACK for default stack size.
The current default stack limit of 512kB is far too small; a fair
number of gcc testsuite failures (for all guests) are directly
attributable to this. Using the -s option in every invocation of
the emulator is annoying to say the least.
A reasonable compromise seems to be to honor the system rlimit.
At least on two Linux distributions, this is set to 8MB and 10MB
respectively. If the system does not limit the stack, then we're
no worse off than before.
At the same time, rename the variable from x86_stack_size and
change the ultimate fallback size from 512kB to 8MB.
Signed-off-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Diffstat (limited to 'linux-user/elfload.c')
-rw-r--r-- | linux-user/elfload.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/linux-user/elfload.c b/linux-user/elfload.c index 91eea62178..b721b107d5 100644 --- a/linux-user/elfload.c +++ b/linux-user/elfload.c @@ -1004,7 +1004,7 @@ static abi_ulong setup_arg_pages(abi_ulong p, struct linux_binprm *bprm, /* Create enough stack to hold everything. If we don't use * it for args, we'll use it for something else... */ - size = x86_stack_size; + size = guest_stack_size; if (size < MAX_ARG_PAGES*TARGET_PAGE_SIZE) size = MAX_ARG_PAGES*TARGET_PAGE_SIZE; error = target_mmap(0, |