Skip to content

Commit

Permalink
Fixed setting internal thread size.
Browse files Browse the repository at this point in the history
On FreeBSD, setting the stack to 4096 bytes for threads like the Console
Listener was not sufficient. This resulted in a SEGV while booting Rubinius,
which happens before the signal handler has been set up, so nothing is shown
in the logs. This also causes Rubinius to abort while trying to build
Melbourne, leaving Rubinius in a very difficult to debug configuration.
brixen committed May 2, 2016
1 parent 0b306fb commit 4b2a14b
Showing 3 changed files with 4 additions and 5 deletions.
5 changes: 2 additions & 3 deletions machine/internal_threads.hpp
Original file line number Diff line number Diff line change
@@ -26,9 +26,8 @@ namespace rubinius {
public:

enum StackSize {
eSmall = 0x1000,
eLarge = 0x10000,
eXLarge = 0x100000,
eSmall = 0x10000,
eLarge = 0x100000,
};

InternalThread(STATE, std::string name, StackSize stack_size=eLarge);
2 changes: 1 addition & 1 deletion machine/jit/llvm/state.cpp
Original file line number Diff line number Diff line change
@@ -90,7 +90,7 @@ namespace rubinius {
static const bool debug_search = false;

LLVMState::LLVMState(STATE)
: InternalThread(state, "rbx.jit", InternalThread::eXLarge)
: InternalThread(state, "rbx.jit", InternalThread::eLarge)
, state_(0)
, config_(state->shared().config)
, compile_list_(state)
2 changes: 1 addition & 1 deletion machine/memory/finalizer.cpp
Original file line number Diff line number Diff line change
@@ -76,7 +76,7 @@ namespace memory {
}

FinalizerThread::FinalizerThread(STATE)
: InternalThread(state, "rbx.finalizer", InternalThread::eXLarge)
: InternalThread(state, "rbx.finalizer", InternalThread::eLarge)
, lists_(NULL)
, live_list_(NULL)
, process_list_(NULL)

0 comments on commit 4b2a14b

Please sign in to comment.