Skip to content

Instantly share code, notes, and snippets.

@yorickpeterse
Created January 7, 2015 20:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save yorickpeterse/05133cf74cb5f0c839fa to your computer and use it in GitHub Desktop.
Save yorickpeterse/05133cf74cb5f0c839fa to your computer and use it in GitHub Desktop.
class Example
def foo
return 10 + 20
end
end
example = Example.new
method = example.method(:foo).executable
Rubinius::JIT.compile(example, method)
Starting program: /home/yorickpeterse/.rubies/rbx-git/bin/rbx /tmp/test.rb
warning: Could not load shared library symbols for linux-vdso.so.1.
Do you need "set solib-search-path" or "set sysroot"?
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/usr/lib/libthread_db.so.1".
[New Thread 0x7ffff4cf9700 (LWP 31170)]
[New Thread 0x7ffff48f8700 (LWP 31171)]
[New Thread 0x7ffff44f7700 (LWP 31172)]
[New Thread 0x7fffe7fff700 (LWP 31173)]
[New Thread 0x7fffe7bfe700 (LWP 31174)]
[New Thread 0x7fffe77fd700 (LWP 31175)]
[New Thread 0x7fffe67bc700 (LWP 31176)]
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7fffe77fd700 (LWP 31175)]
0x00000000008c5851 in CFGCalculator (this=<optimized out>, mcode=0x0) at /home/yorickpeterse/Private/Projects/ruby/rubinius/vm/llvm/cfg.hpp:97
97 {}
Thread 8 (Thread 0x7fffe67bc700 (LWP 31176)):
#0 0x00007ffff706c8cf in pthread_cond_wait@@GLIBC_2.3.2 () from /usr/lib/libpthread.so.0
#1 0x0000000000897348 in wait (this=<optimized out>, mutex=...) at /home/yorickpeterse/Private/Projects/ruby/rubinius/vm/util/thread.hpp:455
#2 rubinius::ImmixMarker::perform (this=0x1ef5250, state=0x7fffe67bbec0) at vm/gc/immix_marker.cpp:179
#3 0x0000000000897013 in rubinius::immix_marker_tramp (state=0x7fffe67bbec0) at vm/gc/immix_marker.cpp:19
#4 0x000000000086d876 in rubinius::Thread::in_new_thread (ptr=0x1ef5380) at vm/builtin/thread.cpp:283
#5 0x00007ffff7067314 in start_thread () from /usr/lib/libpthread.so.0
#6 0x00007ffff61fc24d in clone () from /usr/lib/libc.so.6
Thread 7 (Thread 0x7fffe77fd700 (LWP 31175)):
#0 0x00000000008c5851 in CFGCalculator (this=<optimized out>, mcode=0x0) at /home/yorickpeterse/Private/Projects/ruby/rubinius/vm/llvm/cfg.hpp:97
#1 rubinius::jit::Builder::pass_one (this=0x7fffe77fc4f8, body=0x7fffdc062590) at vm/llvm/jit_builder.cpp:506
#2 0x00000000008c6307 in rubinius::jit::Builder::alloc_frame (this=0x7fffe77fc4f8, body_name=<optimized out>) at vm/llvm/jit_builder.cpp:675
#3 0x00000000008f20a3 in rubinius::jit::MethodBuilder::setup (this=0x7fffe77fc4f8) at vm/llvm/jit_method.cpp:59
#4 0x00000000008e749f in rubinius::jit::Compiler::compile_method (this=0x7fffe77fcae0, req=<optimized out>) at vm/llvm/jit_compiler.cpp:268
#5 0x00000000008fd70b in rubinius::LLVMState::perform (this=0x1a40930, state=0x7fffe77fcec0) at vm/llvm/state.cpp:331
#6 0x00000000008fd2ac in rubinius::jit_llvm_trampoline (state=0x7fffe77fcec0) at vm/llvm/state.cpp:188
#7 0x000000000086d876 in rubinius::Thread::in_new_thread (ptr=0x1dd2e60) at vm/builtin/thread.cpp:283
#8 0x00007ffff7067314 in start_thread () from /usr/lib/libpthread.so.0
#9 0x00007ffff61fc24d in clone () from /usr/lib/libc.so.6
Thread 6 (Thread 0x7fffe7bfe700 (LWP 31174)):
#0 0x00007ffff706f3cd in read () from /usr/lib/libpthread.so.0
#1 0x0000000000907cc1 in rubinius::utilities::timer::Timer::wait_for_tick (this=<optimized out>) at vm/util/timer.cpp:122
#2 0x00000000007b7aec in rubinius::metrics::Metrics::process_metrics (this=0x1dcda50, state=0x7fffe7bfdec0) at vm/metrics.cpp:502
#3 0x00000000007b79e9 in rubinius::metrics::metrics_trampoline (state=0x7fffe7bfdec0) at vm/metrics.cpp:68
#4 0x000000000086d876 in rubinius::Thread::in_new_thread (ptr=0x1dd1550) at vm/builtin/thread.cpp:283
#5 0x00007ffff7067314 in start_thread () from /usr/lib/libpthread.so.0
#6 0x00007ffff61fc24d in clone () from /usr/lib/libc.so.6
Thread 5 (Thread 0x7fffe7fff700 (LWP 31173)):
#0 0x00007ffff706c8cf in pthread_cond_wait@@GLIBC_2.3.2 () from /usr/lib/libpthread.so.0
#1 0x00000000005d8b89 in wait (this=<optimized out>, mutex=...) at /home/yorickpeterse/Private/Projects/ruby/rubinius/vm/util/thread.hpp:455
#2 rubinius::console::Console::process_responses (this=0x1d93c90, state=0x7fffe7ffeec0) at vm/console.cpp:412
#3 0x00000000005d8909 in rubinius::console::console_response_trampoline (state=0x7fffe7ffeec0) at vm/console.cpp:43
#4 0x000000000086d876 in rubinius::Thread::in_new_thread (ptr=0x1dcd110) at vm/builtin/thread.cpp:283
#5 0x00007ffff7067314 in start_thread () from /usr/lib/libpthread.so.0
#6 0x00007ffff61fc24d in clone () from /usr/lib/libc.so.6
Thread 4 (Thread 0x7ffff44f7700 (LWP 31172)):
#0 0x00007ffff706f3cd in read () from /usr/lib/libpthread.so.0
#1 0x00000000008305f5 in rubinius::FSEvent::wait_for_event (this=<optimized out>, state=<optimized out>) at vm/builtin/fsevent.cpp:139
#2 0x00000000005d86a5 in rubinius::console::Console::process_requests (this=0x1d93c90, state=0x7ffff44f6ec0) at vm/console.cpp:311
#3 0x00000000005d85b9 in rubinius::console::console_request_trampoline (state=0x7ffff44f6ec0) at vm/console.cpp:36
#4 0x000000000086d876 in rubinius::Thread::in_new_thread (ptr=0x1dcca70) at vm/builtin/thread.cpp:283
#5 0x00007ffff7067314 in start_thread () from /usr/lib/libpthread.so.0
#6 0x00007ffff61fc24d in clone () from /usr/lib/libc.so.6
Thread 3 (Thread 0x7ffff48f8700 (LWP 31171)):
#0 0x00007ffff706c8cf in pthread_cond_wait@@GLIBC_2.3.2 () from /usr/lib/libpthread.so.0
#1 0x0000000000891af1 in wait (this=<optimized out>, mutex=...) at /home/yorickpeterse/Private/Projects/ruby/rubinius/vm/util/thread.hpp:455
#2 worker_wait (this=<optimized out>) at vm/gc/finalize.cpp:481
#3 rubinius::FinalizerHandler::perform (this=0x1a109a0, state=0x7ffff48f7ec0) at vm/gc/finalize.cpp:196
#4 0x0000000000891969 in rubinius::finalizer_handler_tramp (state=0x7ffff48f7ec0) at vm/gc/finalize.cpp:74
#5 0x000000000086d876 in rubinius::Thread::in_new_thread (ptr=0x1a54370) at vm/builtin/thread.cpp:283
#6 0x00007ffff7067314 in start_thread () from /usr/lib/libpthread.so.0
#7 0x00007ffff61fc24d in clone () from /usr/lib/libc.so.6
Thread 2 (Thread 0x7ffff4cf9700 (LWP 31170)):
#0 0x00007ffff706c8cf in pthread_cond_wait@@GLIBC_2.3.2 () from /usr/lib/libpthread.so.0
#1 0x00000000007d534a in wait (this=<optimized out>, mutex=...) at /home/yorickpeterse/Private/Projects/ruby/rubinius/vm/util/thread.hpp:455
#2 rubinius::SignalHandler::perform (this=0x1a10e10, state=0x7ffff4cf8ec0) at vm/signal.cpp:165
#3 0x00000000007d51f9 in rubinius::signal_handler_tramp (state=0x7ffff4cf8ec0) at vm/signal.cpp:54
#4 0x000000000086d876 in rubinius::Thread::in_new_thread (ptr=0x1a40300) at vm/builtin/thread.cpp:283
#5 0x00007ffff7067314 in start_thread () from /usr/lib/libpthread.so.0
#6 0x00007ffff61fc24d in clone () from /usr/lib/libc.so.6
Thread 1 (Thread 0x7ffff7fbb740 (LWP 31166)):
#0 0x00007ffff706c8cf in pthread_cond_wait@@GLIBC_2.3.2 () from /usr/lib/libpthread.so.0
#1 0x00000000008fec30 in wait (this=0x1a40aa0, mutex=...) at /home/yorickpeterse/Private/Projects/ruby/rubinius/vm/util/thread.hpp:455
#2 rubinius::LLVMState::compile (this=0x1a40930, state=0x19b2f10, gct=..., code=0x7fffe61c7208, call_frame=0x7fffffff9ee0, receiver_class=<optimized out>, block_env=<optimized out>, is_block=<optimized out>)
at vm/llvm/state.cpp:467
#3 0x0000000000838474 in rubinius::JIT::compile (this=0x1a40aa4, state=0x80, object=<optimized out>, code=0xffffffffffffffff, block_environment=<optimized out>, call_frame=<optimized out>) at vm/builtin/jit.cpp:34
#4 0x0000000000614ba4 in invoke_jit_compile (state=0x19b2f10, call_frame=0x7fffffff9ee0, args=<optimized out>, arg_count=<optimized out>)
at /home/yorickpeterse/Private/Projects/ruby/rubinius/vm/gen/invoke_primitives.cpp:4206
#5 0x00000000005ef12f in rubinius::MachineCode::interpreter (state=0x19b2f10, mcode=0x1a96f60, call_frame=0x7fffffff9ee0) at /home/yorickpeterse/Private/Projects/ruby/rubinius/vm/gen/instruction_implementations.hpp:1389
#6 0x0000000000646b3b in rubinius::MachineCode::execute_specialized<rubinius::GenericArguments> (state=0x19b2f10, previous=0x7fffffffa8b0, exec=<optimized out>, mod=<optimized out>, args=...) at vm/machine_code.cpp:800
#7 0x0000000000816bb6 in rubinius::CallSite::empty_cache (state=0x19b2f10, call_site=<optimized out>, call_frame=0x7fffffffa8b0, args=...) at vm/builtin/call_site.cpp:95
#8 0x00000000005ebd83 in execute (this=0x80, state=0x19b2f10, args=<error reading variable: Cannot access memory at address 0xffffffffffffffff>, call_frame=<optimized out>)
at /home/yorickpeterse/Private/Projects/ruby/rubinius/vm/builtin/call_site.hpp:108
#9 rubinius::MachineCode::interpreter (state=0x19b2f10, mcode=0x1b0fad0, call_frame=0x7fffffffa8b0) at /home/yorickpeterse/Private/Projects/ruby/rubinius/vm/gen/instruction_implementations.hpp:593
#10 0x000000000064642b in rubinius::MachineCode::execute_as_script (this=<optimized out>, state=0x19b2f10, code=<optimized out>, previous=0x7fffffffb320) at vm/machine_code.cpp:863
#11 0x000000000086c98d in rubinius::System::vm_run_script (state=0x19b2f10, gct=..., code=<optimized out>, calling_environment=0x7fffffffb320) at vm/builtin/system.cpp:1809
#12 0x0000000000773aac in rubinius::Primitives::vm_run_script (state=0x19b2f10, call_frame=0x7fffffffb320, exec=0x7ffff5004870, mod=0x1a1a5b0, args=...)
at /home/yorickpeterse/Private/Projects/ruby/rubinius/vm/gen/method_primitives.cpp:22346
#13 0x0000000000816bb6 in rubinius::CallSite::empty_cache (state=0x19b2f10, call_site=<optimized out>, call_frame=0x7fffffffb320, args=...) at vm/builtin/call_site.cpp:95
#14 0x00000000005ebd83 in execute (this=0x80, state=0x19b2f10, args=<error reading variable: Cannot access memory at address 0xffffffffffffffff>, call_frame=<optimized out>)
at /home/yorickpeterse/Private/Projects/ruby/rubinius/vm/builtin/call_site.hpp:108
#15 rubinius::MachineCode::interpreter (state=0x19b2f10, mcode=0x1c213a0, call_frame=0x7fffffffb320) at /home/yorickpeterse/Private/Projects/ruby/rubinius/vm/gen/instruction_implementations.hpp:593
#16 0x000000000064949f in rubinius::MachineCode::execute_specialized<rubinius::OneArgument> (state=0x19b2f10, previous=0x7fffffffbdd0, exec=<optimized out>, mod=<optimized out>, args=...) at vm/machine_code.cpp:800
#17 0x000000000081b5d8 in rubinius::CompiledCode::default_executor (state=0x19b2f10, call_frame=0x7fffffffbdd0, exec=<optimized out>, mod=<optimized out>, args=...) at vm/builtin/compiled_code.cpp:228
#18 0x0000000000816bb6 in rubinius::CallSite::empty_cache (state=0x19b2f10, call_site=<optimized out>, call_frame=0x7fffffffbdd0, args=...) at vm/builtin/call_site.cpp:95
#19 0x00000000005ebd83 in execute (this=0x80, state=0x19b2f10, args=<error reading variable: Cannot access memory at address 0xffffffffffffffff>, call_frame=<optimized out>)
at /home/yorickpeterse/Private/Projects/ruby/rubinius/vm/builtin/call_site.hpp:108
#20 rubinius::MachineCode::interpreter (state=0x19b2f10, mcode=0x1a94e30, call_frame=0x7fffffffbdd0) at /home/yorickpeterse/Private/Projects/ruby/rubinius/vm/gen/instruction_implementations.hpp:593
#21 0x0000000000646b3b in rubinius::MachineCode::execute_specialized<rubinius::GenericArguments> (state=0x19b2f10, previous=0x7fffffffc880, exec=<optimized out>, mod=<optimized out>, args=...) at vm/machine_code.cpp:800
#22 0x000000000081b5d8 in rubinius::CompiledCode::default_executor (state=0x19b2f10, call_frame=0x7fffffffc880, exec=<optimized out>, mod=<optimized out>, args=...) at vm/builtin/compiled_code.cpp:228
#23 0x0000000000816bb6 in rubinius::CallSite::empty_cache (state=0x19b2f10, call_site=<optimized out>, call_frame=0x7fffffffc880, args=...) at vm/builtin/call_site.cpp:95
#24 0x00000000005ebd83 in execute (this=0x80, state=0x19b2f10, args=<error reading variable: Cannot access memory at address 0xffffffffffffffff>, call_frame=<optimized out>)
at /home/yorickpeterse/Private/Projects/ruby/rubinius/vm/builtin/call_site.hpp:108
#25 rubinius::MachineCode::interpreter (state=0x19b2f10, mcode=0x1b754c0, call_frame=0x7fffffffc880) at /home/yorickpeterse/Private/Projects/ruby/rubinius/vm/gen/instruction_implementations.hpp:593
#26 0x000000000064790a in rubinius::MachineCode::execute_specialized<rubinius::NoArguments> (state=0x19b2f10, previous=0x7fffffffd340, exec=<optimized out>, mod=<optimized out>, args=...) at vm/machine_code.cpp:800
#27 0x000000000081b5d8 in rubinius::CompiledCode::default_executor (state=0x19b2f10, call_frame=0x7fffffffd340, exec=<optimized out>, mod=<optimized out>, args=...) at vm/builtin/compiled_code.cpp:228
#28 0x00000000008175dd in rubinius::CallSite::empty_cache_vcall (state=0x19b2f10, call_site=<optimized out>, call_frame=0x7fffffffd340, args=...) at vm/builtin/call_site.cpp:161
#29 0x00000000005ebc86 in execute (this=0x80, state=0x19b2f10, args=<error reading variable: Cannot access memory at address 0xffffffffffffffff>, call_frame=<optimized out>)
at /home/yorickpeterse/Private/Projects/ruby/rubinius/vm/builtin/call_site.hpp:108
#30 rubinius::MachineCode::interpreter (state=0x19b2f10, mcode=0x1dd9b90, call_frame=0x7fffffffd340) at /home/yorickpeterse/Private/Projects/ruby/rubinius/vm/gen/instruction_implementations.hpp:576
#31 0x000000000064790a in rubinius::MachineCode::execute_specialized<rubinius::NoArguments> (state=0x19b2f10, previous=0x0, exec=<optimized out>, mod=<optimized out>, args=...) at vm/machine_code.cpp:800
#32 0x000000000081b5d8 in rubinius::CompiledCode::default_executor (state=0x19b2f10, call_frame=0x0, exec=<optimized out>, mod=<optimized out>, args=...) at vm/builtin/compiled_code.cpp:228
#33 0x00000000008521f6 in rubinius::Object::send (this=<optimized out>, state=0x80, caller=0x1, name=<optimized out>, allow_private=<optimized out>) at vm/builtin/object.cpp:515
#34 0x00000000005e0ed5 in rubinius::Environment::run_from_filesystem (this=<optimized out>) at vm/environment.cpp:841
#35 0x000000000088e248 in main (argc=<optimized out>, argv=<optimized out>) at vm/drivers/cli.cpp:55
A debugging session is active.
Inferior 1 [process 31166] will be killed.
Quit anyway? (y or n)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment