From 7dab93de00362209bd515b7ebde9e80b2d3ee0e9 Mon Sep 17 00:00:00 2001 From: Joel Dice Date: Sun, 15 Jul 2007 19:07:13 -0600 Subject: [PATCH] fix stack overflow in stress() due to StateResource destructor --- src/heap.cpp | 2 +- src/machine.h | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/heap.cpp b/src/heap.cpp index 6d3d96568e..f437955d35 100644 --- a/src/heap.cpp +++ b/src/heap.cpp @@ -17,7 +17,7 @@ const unsigned MinimumGen2SizeInBytes = 128 * 1024; const unsigned Top = ~static_cast(0); -const bool Verbose = true; +const bool Verbose = false; const bool Debug = false; class Context; diff --git a/src/machine.h b/src/machine.h index 1854f99e28..dee4bc0938 100644 --- a/src/machine.h +++ b/src/machine.h @@ -1221,13 +1221,14 @@ stress(Thread* t) { if ((not t->stress) and t->state != Thread::NoState) { t->stress = true; - ENTER(t, Thread::ExclusiveState); + { ENTER(t, Thread::ExclusiveState); # ifdef VM_STRESS_MAJOR - collect(t, Heap::MajorCollection); + collect(t, Heap::MajorCollection); # else // not VM_STRESS_MAJOR - collect(t, Heap::MinorCollection); + collect(t, Heap::MinorCollection); # endif // not VM_STRESS_MAJOR + } t->stress = false; }