Skip to content

Instantly share code, notes, and snippets.

View shyouhei's full-sized avatar

卜部昌平 shyouhei

View GitHub Profile
zsh % git svn dcommit
Committing to svn+ssh://svn@ci.ruby-lang.org/ruby/trunk ...
M include/ruby/ruby.h
Committed r61905
M include/ruby/ruby.h
r61905 = 2453ad5cc2cb94d9d446feaff2aa8b49feef365d (refs/remotes/svn/trunk)
M include/ruby/ruby.h
Committed r61906
M include/ruby/ruby.h
r61906 = e7ac1c60436023bd9ff7ae99cca11fe3c16e1ed1 (refs/remotes/svn/trunk)
diff --git a/tool/ruby_vm/scripts/insns2vm.rb b/tool/ruby_vm/scripts/insns2vm.rb
index b1c604b570..ca857aacc4 100644
--- a/tool/ruby_vm/scripts/insns2vm.rb
+++ b/tool/ruby_vm/scripts/insns2vm.rb
@@ -22,7 +22,7 @@ def router argv
def generate_parser
OptionParser.new do |this|
- this.on "-I", "--srcdir=DIR", <<~'end'
+ this.on "-I", "--srcdir=DIR", <<-'end'
/* -*- mode:c; style:ruby; coding: utf-8; indent-tabs-mode: nil -*- */
/* This is an auto-generated file and is a part of the programming language
* Ruby. The person who created a program to generate this file (``I''
* hereafter) would like to refrain from defining licensing of this generated
* source code.
*
* This file consist of many small parts of codes copyrighted by each authors,
* not only the ``I'' person. Those original authors agree with some
* open-source license. I believe that the license we agree is the condition
From ad69876f1cb22a7330e19a73fe5760c06ef92d32 Mon Sep 17 00:00:00 2001
From: "Urabe, Shyouhei" <shyouhei@ruby-lang.org>
Date: Mon, 11 Dec 2017 16:25:23 +0900
Subject: [PATCH] R.I.P OPT_CALL_THREADED_CODE (2005-2017)
Not me, but revision r60763 killed this feature. It seems no one
has bothered that silent breakage so far. I cannot but conclude
that it has no practical usage. Let us delete the macro and
related codes to make things simpler.
@shyouhei
shyouhei / chart.png
Last active September 29, 2017 05:50
chart.png
% lldb -- ./miniruby -e0
(lldb) target create "./miniruby"
Current executable set to './miniruby' (x86_64).
(lldb) settings set -- target.run-args "-e0"
(lldb) env RUBY_DEBUG=gc_stress
(lldb) run
Process 92824 launched: './miniruby' (x86_64)
Process 92824 stopped
* thread #1: tid = 0xc1c4b, 0x00000001001b2f5a miniruby`rb_const_defined(klass=4317686760, id=3579) + 106 at variable.c:3067, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=1, address=0x10)
frame #0: 0x00000001001b2f5a miniruby`rb_const_defined(klass=4317686760, id=3579) + 106 at variable.c:3067
This file has been truncated, but you can view the full file.
% lldb -- ./miniruby -e0
(lldb) target create "./miniruby"
Current executable set to './miniruby' (x86_64).
(lldb) settings set -- target.run-args "-e0"
(lldb) DYDYLD_INSERT_LIBRARIES=/usr/lib/libgmalloc.dylib
(lldb) MALLOC_PROTECT_BEFORE=1
(lldb) env MALLOC_CHECK_HARDER=1
(lldb) RUBY_DEBUG=gc_stress
(lldb) run
Process 53714 launched: './miniruby' (x86_64)
% lldb -- ./miniruby -e0
(lldb) target create "./miniruby"
Current executable set to './miniruby' (x86_64).
(lldb) settings set -- target.run-args "-e0"
(lldb) env DYLD_INSERT_LIBRARIES=/usr/lib/libgmalloc.dylib
(lldb) env MALLOC_CHECK_HARDER=1
(lldb) env MALLOC_PROTECT_BEFORE=1
(lldb) env RUBY_DEBUG=gc_stress
(lldb) run
Process 11348 launched: './miniruby' (x86_64)
% lldb -- ./miniruby -e0
(lldb) target create "./miniruby"
Current executable set to './miniruby' (x86_64).
(lldb) settings set -- target.run-args "-e0"
(lldb) env RUBY_DEBUG=gc_stress
(lldb) run
Process 10265 launched: './miniruby' (x86_64)
Process 10265 stopped
* thread #1: tid = 0x7fe2a, 0x00000001001b1eea miniruby`rb_const_defined(klass=4320554240, id=3579) + 106 at variable.c:3067, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=1, address=0x10)
frame #0: 0x00000001001b1eea miniruby`rb_const_defined(klass=4320554240, id=3579) + 106 at variable.c:3067