| Index: samples/shell.cc
|
| diff --git a/samples/shell.cc b/samples/shell.cc
|
| index 3efd9dbb503e703416d5334ebb5f123c6ecce586..5d5ad4a1f8506fe85ed680ef381c68f346f411d3 100644
|
| --- a/samples/shell.cc
|
| +++ b/samples/shell.cc
|
| @@ -109,7 +109,19 @@ class SourceGroup {
|
|
|
| #else
|
| void StartExecuteInThread() {
|
| - pthread_create(&thread_, NULL, &IsolateThreadEntry, this);
|
| + pthread_attr_t attr;
|
| + // On some systems (OSX 10.6) the stack size default is 0.5Mb or less
|
| + // which is not enough to parse the big literal expressions used in tests.
|
| + // The stack size should be at least StackGuard::kLimitSize + some
|
| + // OS-specific padding for thread startup code.
|
| + size_t stacksize = 1024 * 1024; // 1 Mb seems to be enough
|
| + pthread_attr_init(&attr);
|
| + pthread_attr_setstacksize (&attr, stacksize);
|
| + int error = pthread_create(&thread_, &attr, &IsolateThreadEntry, this);
|
| + if (error) {
|
| + printf("Error creating isolate thread.\n");
|
| + exit(1);
|
| + }
|
| }
|
|
|
| void WaitForThread() {
|
|
|