Skip to content

Instantly share code, notes, and snippets.

CC vm/oop.cpp
cc1plus: warnings being treated as errors
vm/oop.cpp: In member function 'void rubinius::ObjectHeader::clear_fields()':
vm/oop.cpp:54: warning: dereferencing type-punned pointer will break strict-aliasing rules
vm/oop.cpp: In member function 'void rubinius::ObjectHeader::clear_body_to_null()':
vm/oop.cpp:62: warning: dereferencing type-punned pointer will break strict-aliasing rules
rake aborted!
Command failed with status (1): [gcc -Ivm/external_libs/libtommath -Ivm/ext...]
Compiling lib/ruby_parser_extras.rb
Compiling lib/sexp.rb
Compiling lib/sexp_processor.rb
rbx: vm/objectmemory.hpp:114: bool rubinius::ObjectMemory::deallocate_context(rubinius::MethodContext*): Assertion `contexts.current >= contexts.start' failed.
rake aborted!
Command failed with status (): [./bin/rbx compile -d -p -I/home/djwhitt/sc...]
(See full trace by running task with --trace)
djwhitt@gurney:~/scratch/rubinius $ uname -a
Linux gurney 2.6.25-gentoo-r7 #13 SMP Mon Oct 13 21:34:51 EDT 2008 x86_64 Intel(R) Core(TM)2 Duo CPU T9300 @ 2.50GHz GenuineIntel GNU/Linux
djwhitt@gurney:~/scratch/rubinius $ gcc --version
gcc (GCC) 4.1.2 (Gentoo 4.1.2 p1.1)
Copyright (C) 2006 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
djwhitt@gurney:~/scratch/rubinius $
rake vm:test
(in /home/djwhitt/scratch/rubinius)
GEN vm/test/runner.cpp
CC vm/test/runner.cpp
LD vm/test/runner
Running 837 tests...........................................................................................................
In TestChannel::test_receive_causes_event_block:
./vm/test/test_channel.hpp:118: Error: Assertion failed: chan->waiting()->empty_p()
..............................................................................................................................................................................................................
In TestInstructions::test_push_my_field:
#0 0x00007f5d9f134ad0 in ?? ()
#1 0x0000000000582e98 in rubinius::String::create (state=0x12a72b0,
str=0xa86005ee00007fff <Address 0xa86005ee00007fff out of bounds>, bytes=0) at vm/builtin/string.cpp:69
#2 0x0000000000563c25 in rubinius::Primitives::memorypointer_read_string_to_null (state=0x12a72b0, task=0x2bbb998,
msg=@0x0) at vm/gen/primitives_glue.gen.cpp:3834
#3 0x00000000005a76fe in rubinius::VMMethod::resume (this=0x155e8f0, task=0x2bbb998, ctx=0x7f5d9eedeeb0)
at vm/gen/instructions.cpp:2308
#4 0x000000000057d5c1 in rubinius::Task::execute (this=0x2bbb998) at vm/builtin/task.cpp:574
#5 0x0000000000555c1d in rubinius::VM::run_and_monitor (this=0x12a72b0) at vm/vm.cpp:375
#6 0x000000000056b941 in rubinius::CompiledFile::execute (this=<value optimized out>, state=0x12a72b0)
irb(main):003:0> FFI.type_size :pointer
PrimitiveFailure: Unable to find type size for pointer
from FFI.type_size at kernel/platform/ffi.rb:539
from Object#irb_binding {} at (irb):1
From 098c8d00a4315dbf1302cdfe02c993e4e3aa3200 Mon Sep 17 00:00:00 2001
From: David Whittington <djwhitt@gmail.com>
Date: Sun, 26 Oct 2008 21:27:42 -0400
Subject: [PATCH] Fix for hardcoded type_size in env.rb
---
kernel/common/env.rb | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/kernel/common/env.rb b/kernel/common/env.rb
From 098c8d00a4315dbf1302cdfe02c993e4e3aa3200 Mon Sep 17 00:00:00 2001
From: David Whittington <djwhitt@gmail.com>
Date: Sun, 26 Oct 2008 21:27:42 -0400
Subject: [PATCH] Fix for hardcoded type_size in env.rb
---
kernel/common/env.rb | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/kernel/common/env.rb b/kernel/common/env.rb
Run 1:
Iterations: 1000000
Control: 1m loops accessing a local variable 100 times
0.847393 0.000000 0.847393 ( 0.847421)
0.840755 0.000000 0.840755 ( 0.840760)
Control 2: 1m loops accessing nil 100 times
0.495462 0.000000 0.495462 ( 0.495522)
0.495049 0.000000 0.495049 ( 0.495107)
Test fastmath: 250k loops accessing a fixnum var and calling + 1
MRI 1.8.6 p287
==============
Iterations: 1000000
Control: 1m loops accessing a local variable 100 times
2.590000 0.000000 2.590000 ( 2.592084)
2.560000 0.010000 2.570000 ( 2.571405)
Control 2: 1m loops accessing nil 100 times
2.110000 0.010000 2.120000 ( 2.125436)
2.040000 0.000000 2.040000 ( 2.055528)