Skip to content

Instantly share code, notes, and snippets.

View shyouhei's full-sized avatar

卜部昌平 shyouhei

View GitHub Profile
send-keys -X copy-pipe-and-cancel
zsh % make miniruby
CC = clang-4.0
LD = ld
LDSHARED = clang-4.0 -dynamic -bundle
CFLAGS = -O3 -fno-fast-math -ggdb3 -Wall -Wextra -Wno-unused-parameter -Wno-parentheses -Wno-long-long -Wno-missing-field-initializers -Wno-tautological-compare -Wno-parentheses-equality -Wno-constant-logical-operand -Wno-self-assign -Wunused-variable -Werror=implicit-int -Werror=pointer-arith -Werror=write-strings -Werror=declaration-after-statement -Werror=shorten-64-to-32 -Werror=implicit-function-declaration -Werror=division-by-zero -Werror=deprecated-declarations -Werror=extra-tokens -pipe
XCFLAGS = -D_FORTIFY_SOURCE=2 -fstack-protector -fno-strict-overflow -fvisibility=hidden -DRUBY_EXPORT -fPIE
CPPFLAGS = -I/usr/local/opt/libressl/include -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -D_DARWIN_UNLIMITED_SELECT -D_REENTRANT -I. -I.ext/include/x86_64-darwin15 -I/Users/urabe.shyouhei/data/src/ci.ruby-lang.org/ruby/trunk/include -I/Users/urabe.shyouhei/data/src/ci.ruby-lang.org/ruby/tru
zsh % lldb -- ./miniruby -I/Users/urabe.shyouhei/data/src/ci.ruby-lang.org/ruby/branches/ruby_2_3/lib /Users/urabe.shyouhei/data/src/ci.ruby-lang.org/ruby/branches/ruby_2_3/enc/make_encmake.rb enc.mk
(lldb) target create "./miniruby"
Current executable set to './miniruby' (x86_64).
(lldb) settings set -- target.run-args "-I/Users/urabe.shyouhei/data/src/ci.ruby-lang.org/ruby/branches/ruby_2_3/lib" "/Users/urabe.shyouhei/data/src/ci.ruby-lang.org/ruby/branches/ruby_2_3/enc/make_encmake.rb" "enc.mk"
(lldb) env DYLD_INSERT_LIBRARIES=/usr/lib/libgmalloc.dylib
(lldb) run
Process 41621 launched: './miniruby' (x86_64)
GuardMalloc[miniruby-41621]: Allocations will be placed on 16 byte boundaries.
GuardMalloc[miniruby-41621]: - Some buffer overruns may not be noticed.
GuardMalloc[miniruby-41621]: - Applications using vector instructions (e.g., SSE) should work.
% lldb -- ./miniruby -I/Users/urabe.shyouhei/data/src/ci.ruby-lang.org/ruby/branches/ruby_2_3/lib /Users/urabe.shyouhei/data/src/ci.ruby-lang.org/ruby/branches/ruby_2_3/enc/make_encmake.rb enc.mk
(lldb) target create "./miniruby"
Current executable set to './miniruby' (x86_64).
(lldb) settings set -- target.run-args "-I/Users/urabe.shyouhei/data/src/ci.ruby-lang.org/ruby/branches/ruby_2_3/lib" "/Users/urabe.shyouhei/data/src/ci.ruby-lang.org/ruby/branches/ruby_2_3/enc/make_encmake.rb" "enc.mk"
(lldb) env DYLD_INSERT_LIBRARIES=/usr/lib/libgmalloc.dylib
(lldb) env MALLOC_PROTECT_BEFORE=1
(lldb) env MALLOC_CHECK_HARDER=1
(lldb) run
Process 43554 launched: './miniruby' (x86_64)
GuardMalloc[miniruby-43554]: Allocations will be placed on 16 byte boundaries.
% make miniruby
CC = gcc-7
LD = ld
LDSHARED = gcc-7 -dynamic -bundle
CFLAGS = -O3 -fno-fast-math -ggdb3 -Wall -Wextra -Wno-unused-parameter -Wno-parentheses -Wno-long-long -Wno-missing-field-initializers -Wno-tautological-compare -Wno-parentheses-equality -Wno-constant-logical-operand -Wno-self-assign -Wunused-variable -Werror=implicit-int -Werror=pointer-arith -Werror=write-strings -Werror=declaration-after-statement -Werror=implicit-function-declaration -Werror=deprecated-declarations -Wno-packed-bitfield-compat -Wsuggest-attribute=noreturn -Wsuggest-attribute=format -Wimplicit-fallthrough=0 -Wno-expansion-to-defined -pipe
XCFLAGS = -D_FORTIFY_SOURCE=2 -fstack-protector -fno-strict-overflow -fvisibility=hidden -DRUBY_EXPORT -fPIE
CPPFLAGS = -I/usr/local/opt/libressl/include -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -D_DARWIN_UNLIMITED_SELECT -D_REENTRANT -I. -I.ext/include/x86_64-darwin15 -I/Users/urabe.shyouhei/data/src/ci.ruby-lang.org/ruby/branches/ruby_2_3/in
% 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
% 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)
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 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
@shyouhei
shyouhei / chart.png
Last active September 29, 2017 05:50
chart.png