Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin' into codedb-ffi-io
Browse files Browse the repository at this point in the history
  • Loading branch information
brixen committed Jun 6, 2016
2 parents b579c01 + dadcfa7 commit 08c6a86
Show file tree
Hide file tree
Showing 9 changed files with 103 additions and 155 deletions.
15 changes: 11 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,27 +1,33 @@
language: cpp
cache:
ccache: true
directories:
- $HOME/vendor/bundle
- $HOME/.rvm/archives/
sudo: required
dist: trusty
compiler:
- clang
os:
- linux
- osx
ruby: 2.2.0
before_install:
- rvm install 2.2.0 && rvm use 2.2.0
- echo $LANG
- echo $LC_ALL
- if [ $TRAVIS_OS_NAME == linux ]; then ./scripts/llvm.sh; fi
- if [ $TRAVIS_OS_NAME == osx ]; then brew update && brew install llvm; fi
- if [ $TRAVIS_OS_NAME == linux ]; then ccache -s; export CC="ccache clang -Qunused-arguments -fcolor-diagnostics"; export CXX="ccache clang++ -Qunused-arguments -fcolor-diagnostics"; ./scripts/llvm.sh; fi
- if [ $TRAVIS_OS_NAME == osx ]; then brew update && brew install llvm ccache; ccache -s; export CC="ccache clang -Qunused-arguments -fcolor-diagnostics"; export CXX="ccache clang++ -Qunused-arguments -fcolor-diagnostics"; export PATH="/usr/local/opt/ccache/libexec:$PATH"; fi
- gem update --system
- gem --version
before_script:
- travis_retry bundle
- travis_retry bundle -j 2
- if [ $TRAVIS_OS_NAME == linux ]; then travis_retry ./configure --llvm-config=llvm-config-3.6; fi
- if [ $TRAVIS_OS_NAME == osx ]; then travis_retry ./configure; fi
script: rake ci
after_success:
- if [ $TRAVIS_OS_NAME == linux ]; then ./scripts/build_support.sh archive_core; fi
- if [ $TRAVIS_BRANCH == $TRAVIS_TAG ]; then ./scripts/deploy.sh release github website triggers; fi
- ccache -s
branches:
only:
- master
Expand All @@ -41,6 +47,7 @@ notifications:
on_start: always
env:
global:
- CCACHE_CPP2=yes
- LANG="en_US.UTF-8"
- secure: olbok/GN6rOYvPnHBYWGz7giCoCdLFpT/7WSBHukYO3E0uNeqAUOOgW2BFOwCVWdSEJ/iTvJXZQ4qVZHX+6jRfvILZeGv+D2P93VdD8UFQRoTOfFC7esAo525s9fuKm9ehUGWZxlzGOBHHckky1jn6pEf8mlXAVM5e76dlH0fck=
- secure: aqG9eB/PrzQ7XJQN6YX/00sNVvwSB77saxXQzguL2WFjAXB74h6168Hzq+awHtNX/vfOb6ta7fpWLHrA0D+gmZnvTR29VlP6nd0vs1tkdX1/jWbiBHjamRffp+NWVdKbJKYn5iLOGXcuUMOzY/opLKOdvxKZfkxGMxR2tTNLZUE=
Expand Down
12 changes: 6 additions & 6 deletions machine/builtin/data.cpp
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
#include "memory.hpp"
#include "object_utils.hpp"
#include "logger.hpp"
#include "memory.hpp"
#include "on_stack.hpp"


#include "builtin/data.hpp"
#include "builtin/class.hpp"

Expand Down Expand Up @@ -108,18 +110,17 @@ namespace rubinius {
capi::Handle* handle = data->handle(state);

if(!handle->valid_p()) {
std::cerr << "Data::finalize: object has invalid handle!" << std::endl;
logger::fatal("finalizer: Data object has invalid handle");
return;
}

if(handle->object() != data) {
std::cerr << "Data::finalize: handle does not reference object!" << std::endl;
logger::fatal("finalizer: Data object handle does not reference the object");
return;
}

if(data->freed_p()) {
// TODO: Fix the issue of finalizer ordering.
// std::cerr << "Data::finalize called for already freed object" << std::endl;
logger::fatal("finalizer: Data finalize called for already freed object");
return;
}
data->set_freed();
Expand Down Expand Up @@ -155,8 +156,7 @@ namespace rubinius {
}

if(data->freed_p()) {
// TODO: Fix the issue of finalizer ordering.
// std::cerr << "Data::Info::mark called for already freed object" << std::endl;
logger::fatal("finalizer: Data mark called for already freed object");
return;
}

Expand Down
7 changes: 6 additions & 1 deletion machine/builtin/fiber.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,12 @@ namespace rubinius {

void Fiber::finalize(STATE, Fiber* fib) {
#ifdef RBX_FIBER_ENABLED
if(!fib->data()) return;
if(!fib->data()) {
logger::fatal("finalizer: Fiber finalize called on instance with NULL data");
return;
}

logger::fatal("finalizer: Fiber finalize");
fib->data()->orphan(state);

delete fib->data();
Expand Down
5 changes: 3 additions & 2 deletions machine/builtin/system.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -396,10 +396,10 @@ namespace rubinius {

int pid = ::fork();

logger::reset_lock();
state->vm()->thread_nexus()->unlock();

if(pid == 0) {
logger::reset_lock();
state->vm()->after_fork_child(state);
} else if(pid > 0) {
state->shared().machine_threads()->after_fork_exec_parent(state);
Expand Down Expand Up @@ -840,7 +840,6 @@ namespace rubinius {

int pid = ::fork();

logger::reset_lock();
state->vm()->thread_nexus()->unlock();

if(pid > 0) {
Expand All @@ -858,6 +857,8 @@ namespace rubinius {
}
} else if(pid == 0) {
// We're in the child...
logger::reset_lock();

state->vm()->after_fork_child(state);

state->vm()->thread->init_lock();
Expand Down
9 changes: 3 additions & 6 deletions machine/environment.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -186,18 +186,15 @@ namespace rubinius {
}

if(!config.system_log.value.compare("syslog")) {
logger::open(fork_exec_lock_,
logger::eSyslog, RBX_PROGRAM_NAME, level);
logger::open(logger::eSyslog, RBX_PROGRAM_NAME, level);
} else if(!config.system_log.value.compare("console")) {
logger::open(fork_exec_lock_,
logger::eConsoleLogger, RBX_PROGRAM_NAME, level);
logger::open(logger::eConsoleLogger, RBX_PROGRAM_NAME, level);
} else {
expand_config_value(config.system_log.value, "$TMPDIR", config.system_tmp);
expand_config_value(config.system_log.value, "$PROGRAM_NAME", RBX_PROGRAM_NAME);
expand_config_value(config.system_log.value, "$USER", shared->username.c_str());

logger::open(fork_exec_lock_,
logger::eFileLogger,
logger::open(logger::eFileLogger,
config.system_log.value.c_str(), level,
config.system_log_limit.value,
config.system_log_archives.value,
Expand Down
2 changes: 1 addition & 1 deletion machine/fiber_data.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ namespace rubinius {
}

void FiberData::copy_to_heap(STATE) {
assert(status_ != eDead);
if(status_ == eDead) return;
assert(stack_);

heap_size_ = (uintptr_t)stack_->top_address() - (uintptr_t)stack_bottom();
Expand Down
Loading

0 comments on commit 08c6a86

Please sign in to comment.