[ruby-cvs:72698] shyouhei:r65598 (trunk): vm_backtrace.c: pos can be zero

shyouhei at ruby-lang.org shyouhei at ruby-lang.org
Wed Nov 7 17:04:33 JST 2018


shyouhei	2018-11-07 17:04:33 +0900 (Wed, 07 Nov 2018)

  New Revision: 65598

  https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=65598

  Log:
    vm_backtrace.c: pos can be zero
    
    (lldb) target create "./miniruby"
    Current executable set to './miniruby' (x86_64).
    (lldb) settings set -- target.run-args  "-e0"
    (lldb) run
    Process 97005 launched: './miniruby' (x86_64)
    ./miniruby(rb_print_backtrace+0x15) [0x10024f7d5] vm_dump.c:715
    ./miniruby(rb_vm_get_sourceline+0x85) [0x10024c4f5] vm_backtrace.c:43
    ./miniruby(rb_vm_make_binding+0x146) [0x100236976] vm.c:941
    ./miniruby(Init_VM+0x592) [0x100249f02] vm.c:3091
    ./miniruby(rb_call_inits+0xc2) [0x1000c5a72] inits.c:58
    ./miniruby(ruby_setup+0xcb) [0x100098c6b] eval.c:74
    ./miniruby(ruby_init+0x9) [0x100098c99] eval.c:91
    ./miniruby(main+0x4d) [0x10025ddbd] addr2line.c:246
    Process 97005 stopped
    * thread #1: tid = 0x639bb, 0x000000010024c4f5 miniruby`rb_vm_get_sourceline(cfp=<unavailable>) + 133 at vm_backtrace.c:44, queue = 'com.apple.main-thread', stop reason = EXC_BAD_INSTRUCTION (code=EXC_I386_INVOP, subcode=0x0)
        frame #0: 0x000000010024c4f5 miniruby`rb_vm_get_sourceline(cfp=<unavailable>) + 133 at vm_backtrace.c:44
       41       else {
       42           /* SDR() is not possible; that causes infinite loop. */
       43           rb_print_backtrace();
    -> 44           __builtin_trap();
       45       }
       46   #endif
       47       return rb_iseq_line_no(iseq, pos);
    (lldb)

  Modified files:
    trunk/configure.ac
    trunk/vm_backtrace.c


More information about the ruby-cvs mailing list