Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: rubinius/rubinius
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: dadcfa70996f
Choose a base ref
...
head repository: rubinius/rubinius
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: a0a7287d1bee
Choose a head ref
  • 2 commits
  • 2 files changed
  • 1 contributor

Commits on Jun 6, 2016

  1. Copy the full SHA
    7604c13 View commit details
  2. Another Travis test.

    brixen committed Jun 6, 2016
    Copy the full SHA
    a0a7287 View commit details
Showing with 15 additions and 11 deletions.
  1. +10 −6 machine/builtin/data.cpp
  2. +5 −5 machine/builtin/fiber.cpp
16 changes: 10 additions & 6 deletions machine/builtin/data.cpp
Original file line number Diff line number Diff line change
@@ -25,7 +25,9 @@ namespace rubinius {
// the handle and populate it as an RData now.
capi::Handle* handle = data->handle(state);

assert(!handle && "can't already have a handle, it's brand new!");
if(handle) {
Exception::raise_runtime_error(state, "new Data instance already has C-API handle");
}

handle = state->memory()->add_capi_handle(state, data);

@@ -59,7 +61,9 @@ namespace rubinius {
// the handle and populate it as an RData now.
capi::Handle* handle = data->handle(state);

assert(!handle && "can't already have a handle, it's brand new!");
if(handle) {
Exception::raise_runtime_error(state, "new Data instance already has C-API handle");
}

handle = state->memory()->add_capi_handle(state, data);

@@ -110,17 +114,17 @@ namespace rubinius {
capi::Handle* handle = data->handle(state);

if(!handle->valid_p()) {
logger::fatal("finalizer: Data object has invalid handle");
logger::error("finalizer: Data object has invalid handle");
return;
}

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

if(data->freed_p()) {
logger::fatal("finalizer: Data finalize called for already freed object");
logger::error("finalizer: Data finalize called for already freed object");
return;
}
data->set_freed();
@@ -156,7 +160,7 @@ namespace rubinius {
}

if(data->freed_p()) {
logger::fatal("finalizer: Data mark called for already freed object");
logger::error("finalizer: Data mark called for already freed object");
return;
}

10 changes: 5 additions & 5 deletions machine/builtin/fiber.cpp
Original file line number Diff line number Diff line change
@@ -288,12 +288,12 @@ namespace rubinius {

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

logger::write("finalizer: fiber: %ld", (intptr_t)fib);

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

delete fib->data();