OSDN Git Service

x86 needs a bit more stack to handle stack overflows.
authorNicolas Geoffray <ngeoffray@google.com>
Mon, 14 Jul 2014 15:39:07 +0000 (16:39 +0100)
committerNicolas Geoffray <ngeoffray@google.com>
Mon, 14 Jul 2014 16:04:46 +0000 (17:04 +0100)
With the interpreter, 018-stack-overflow fails when being run
command line. Through make, we're not seeing any failure because
make gives a 2GB stack space. However, running run-test in the
shell, the stack space is 8MB, and the reserved space is not enough.

Change-Id: I0da12402cdfe5ad090f34c16aa6cb8d5fbc7a3ea

runtime/instruction_set.h

index 6e10a4c..dce1c15 100644 (file)
@@ -181,7 +181,7 @@ static constexpr size_t kArm64StackOverflowReservedBytes = 32 * KB;
 // TODO: Bumped to workaround regression (http://b/14982147) Specifically to fix:
 // test-art-host-run-test-interpreter-018-stack-overflow
 // test-art-host-run-test-interpreter-107-int-math2
-static constexpr size_t kX86StackOverflowReservedBytes = 24 * KB;
+static constexpr size_t kX86StackOverflowReservedBytes = (kIsDebugBuild ? 32 : 24) * KB;
 static constexpr size_t kX86_64StackOverflowReservedBytes = 32 * KB;
 
 static constexpr size_t GetStackOverflowReservedBytes(InstructionSet isa) {