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.
  • Loading branch information
brixen committed May 2, 2016
1 parent 0b306fb commit 4b2a14b
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
5 changes: 2 additions & 3 deletions machine/internal_threads.hpp
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion machine/jit/llvm/state.cpp
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion machine/memory/finalizer.cpp
Expand Up @@ -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)
Expand Down

0 comments on commit 4b2a14b

Please sign in to comment.