Issue #10545 has been updated by Nobuyoshi N…
Status changed from Open to Closed
% Done changed from 0 to 100
Applied in changeset r48583.
parse.y: fix invalid keyword argument
- parse.y (f_label, f_kw, formal_argument_gen): ignore invalid
formal argument in keyword argument definition.
[ruby-dev:48742] [Bug #10545]
Bug #10545: SEGV: def m(A: a) end
- Author: Akira T.
- Status: Closed
- Priority: Normal
- Assignee:
- Category:
- Target version:
- ruby -v: ruby 2.2.0dev (2014-11-26 trunk 48578) [x86_64-linux]
- Backport: 2.0.0: UNKNOWN, 2.1: UNKNOWN
def m(A: a) end とすると SEGV するようです。
% ./ruby -e 'def m(A: a) end'
-e:1: formal argument must be local variable
def m(A: a) end
^
-e:1: dynamic constant assignment
def m(A: a) end
^
./ruby: [BUG] Segmentation fault at 0x00000000000018
ruby 2.2.0dev (2014-11-26 trunk 48578) [x86_64-linux]
-- Control frame information
-----------------------------------------------
c:0001 p:0000 s:0002 E:000440 TOP [FINISH]
-- Machine register context
------------------------------------------------
RIP: 0x00007f027ffa1830 RBP: 0x00007fff30389f10 RSP: 0x00007fff30389e90
RAX: 0x0000000000000000 RBX: 0x00007fff3038bf50 RCX: 0x00007f0281fd4200
RDX: 0x0000000000000000 RDI: 0x00007f0281bcca20 RSI: 0x00007f0281fd4200
R8: 0x0000000000000001 R9: 0x00007f0281fccd10 R10: 0x00007fff30389ad0
R11: 0x0000000000000000 R12: 0x00007f027fdec950 R13: 0x00007fff3038c090
R14: 0x0000000000000000 R15: 0x0000000000000000 EFL: 0x0000000000010206
-- C level backtrace information
-------------------------------------------
/home/ruby/tst1/ruby/ruby(rb_print_backtrace+0x19) [0x7f027ff25d91]
vm_dump.c:693
/home/ruby/tst1/ruby/ruby(rb_vm_bugreport+0xa9) [0x7f027ff26206]
vm_dump.c:971
/home/ruby/tst1/ruby/ruby(rb_bug_context+0x113) [0x7f027ff82d6e]
error.c:389
/home/ruby/tst1/ruby/ruby(sigsegv+0x5e) [0x7f027fead435] signal.c:849
/lib/x86_64-linux-gnu/libpthread.so.0 [0x7f027f99a8d0]
/home/ruby/tst1/ruby/ruby(new_args_tail_gen+0xb0) [0x7f027ffa1830]
parse.y:9718
/home/ruby/tst1/ruby/ruby(ruby_yyparse+0x8fde) [0x7f027ff93b4e]
parse.y:4522
/home/ruby/tst1/ruby/ruby(yycompile0+0x189) [0x7f027ff95fb8]
parse.y:5489
/home/ruby/tst1/ruby/ruby(rb_suppress_tracing+0x18b) [0x7f027ff2a2a3]
vm_trace.c:402
/home/ruby/tst1/ruby/ruby(yycompile+0x7e) [0x7f027ff9616b] parse.y:5522
/home/ruby/tst1/ruby/ruby(parser_compile_string+0xc5) [0x7f027ff96474]
parse.y:5590
/home/ruby/tst1/ruby/ruby(rb_parser_compile_string_path+0x3a)
[0x7f027ff96554] parse.y:5613
/home/ruby/tst1/ruby/ruby(rb_parser_compile_string+0x39)
[0x7f027ff96518] parse.y:5606
./ruby [0x7f027feaa41a]
/home/ruby/tst1/ruby/ruby(ruby_process_options+0xb7) [0x7f027feabc32]
ruby.c:1930
/home/ruby/tst1/ruby/ruby(ruby_options+0x11f) [0x7f027fdee499]
eval.c:100
/home/ruby/tst1/ruby/ruby(main+0x69) [0x7f027fdecae9] main.c:36
-- Other runtime information
-----------------------------------------------
* Loaded script: ./ruby
* Loaded features:
0 enumerator.so
1 rational.so
2 complex.so
3 /home/ruby/tst1/lib/ruby/2.2.0/x86_64-linux/enc/encdb.so
4 /home/ruby/tst1/lib/ruby/2.2.0/x86_64-linux/enc/trans/transdb.so
5 /home/ruby/tst1/lib/ruby/2.2.0/unicode_normalize.rb
6 /home/ruby/tst1/lib/ruby/2.2.0/x86_64-linux/rbconfig.rb
7 thread.rb
8 /home/ruby/tst1/lib/ruby/2.2.0/x86_64-linux/thread.so
9 /home/ruby/tst1/lib/ruby/2.2.0/rubygems/compatibility.rb
10 /home/ruby/tst1/lib/ruby/2.2.0/rubygems/defaults.rb
11 /home/ruby/tst1/lib/ruby/2.2.0/rubygems/deprecate.rb
12 /home/ruby/tst1/lib/ruby/2.2.0/rubygems/errors.rb
13 /home/ruby/tst1/lib/ruby/2.2.0/rubygems/version.rb
14 /home/ruby/tst1/lib/ruby/2.2.0/rubygems/requirement.rb
15 /home/ruby/tst1/lib/ruby/2.2.0/rubygems/platform.rb
16 /home/ruby/tst1/lib/ruby/2.2.0/rubygems/basic_specification.rb
17 /home/ruby/tst1/lib/ruby/2.2.0/rubygems/stub_specification.rb
18 /home/ruby/tst1/lib/ruby/2.2.0/rubygems/util/stringio.rb
19 /home/ruby/tst1/lib/ruby/2.2.0/rubygems/specification.rb
20 /home/ruby/tst1/lib/ruby/2.2.0/rubygems/exceptions.rb
21 /home/ruby/tst1/lib/ruby/2.2.0/rubygems/core_ext/kernel_gem.rb
22 /home/ruby/tst1/lib/ruby/2.2.0/monitor.rb
23 /home/ruby/tst1/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb
24 /home/ruby/tst1/lib/ruby/2.2.0/rubygems.rb
* Process memory map:
7f027dbe9000-7f027dd90000 r--s 00000000 08:01 11804384
/lib/x86_64-linux-gnu/libc-2.19.so
7f027dd90000-7f027e302000 r--s 00000000 08:01 15073377
/home/ruby/tst1/ruby/ruby
7f027e302000-7f027e318000 r-xp 00000000 08:01 11796586
/lib/x86_64-linux-gnu/libgcc_s.so.1
7f027e318000-7f027e517000 ---p 00016000 08:01 11796586
/lib/x86_64-linux-gnu/libgcc_s.so.1
7f027e517000-7f027e518000 rw-p 00015000 08:01 11796586
/lib/x86_64-linux-gnu/libgcc_s.so.1
7f027e518000-7f027e51b000 r-xp 00000000 08:01 15859747
/home/ruby/tst1/lib/ruby/2.2.0/x86_64-linux/thread.so
7f027e51b000-7f027e71b000 ---p 00003000 08:01 15859747
/home/ruby/tst1/lib/ruby/2.2.0/x86_64-linux/thread.so
7f027e71b000-7f027e71c000 rw-p 00003000 08:01 15859747
/home/ruby/tst1/lib/ruby/2.2.0/x86_64-linux/thread.so
7f027e71c000-7f027e71e000 r-xp 00000000 08:01 15859769
/home/ruby/tst1/lib/ruby/2.2.0/x86_64-linux/enc/trans/transdb.so
7f027e71e000-7f027e91e000 ---p 00002000 08:01 15859769
/home/ruby/tst1/lib/ruby/2.2.0/x86_64-linux/enc/trans/transdb.so
7f027e91e000-7f027e91f000 rw-p 00002000 08:01 15859769
/home/ruby/tst1/lib/ruby/2.2.0/x86_64-linux/enc/trans/transdb.so
7f027e91f000-7f027e921000 r-xp 00000000 08:01 15859801
/home/ruby/tst1/lib/ruby/2.2.0/x86_64-linux/enc/encdb.so
7f027e921000-7f027eb21000 ---p 00002000 08:01 15859801
/home/ruby/tst1/lib/ruby/2.2.0/x86_64-linux/enc/encdb.so
7f027eb21000-7f027eb22000 rw-p 00002000 08:01 15859801
/home/ruby/tst1/lib/ruby/2.2.0/x86_64-linux/enc/encdb.so
7f027eb22000-7f027ec23000 rw-p 00000000 00:00 0
7f027ec23000-7f027edc2000 r-xp 00000000 08:01 11804384
/lib/x86_64-linux-gnu/libc-2.19.so
7f027edc2000-7f027efc2000 ---p 0019f000 08:01 11804384
/lib/x86_64-linux-gnu/libc-2.19.so
7f027efc2000-7f027efc6000 r--p 0019f000 08:01 11804384
/lib/x86_64-linux-gnu/libc-2.19.so
7f027efc6000-7f027efc8000 rw-p 001a3000 08:01 11804384
/lib/x86_64-linux-gnu/libc-2.19.so
7f027efc8000-7f027efcc000 rw-p 00000000 00:00 0
7f027efcc000-7f027f0cc000 r-xp 00000000 08:01 11804388
/lib/x86_64-linux-gnu/libm-2.19.so
7f027f0cc000-7f027f2cb000 ---p 00100000 08:01 11804388
/lib/x86_64-linux-gnu/libm-2.19.so
7f027f2cb000-7f027f2cc000 r--p 000ff000 08:01 11804388
/lib/x86_64-linux-gnu/libm-2.19.so
7f027f2cc000-7f027f2cd000 rw-p 00100000 08:01 11804388
/lib/x86_64-linux-gnu/libm-2.19.so
7f027f2cd000-7f027f2d5000 r-xp 00000000 08:01 11804386
/lib/x86_64-linux-gnu/libcrypt-2.19.so
7f027f2d5000-7f027f4d4000 ---p 00008000 08:01 11804386
/lib/x86_64-linux-gnu/libcrypt-2.19.so
7f027f4d4000-7f027f4d5000 r--p 00007000 08:01 11804386
/lib/x86_64-linux-gnu/libcrypt-2.19.so
7f027f4d5000-7f027f4d6000 rw-p 00008000 08:01 11804386
/lib/x86_64-linux-gnu/libcrypt-2.19.so
7f027f4d6000-7f027f504000 rw-p 00000000 00:00 0
7f027f504000-7f027f507000 r-xp 00000000 08:01 11804387
/lib/x86_64-linux-gnu/libdl-2.19.so
7f027f507000-7f027f706000 ---p 00003000 08:01 11804387
/lib/x86_64-linux-gnu/libdl-2.19.so
7f027f706000-7f027f707000 r--p 00002000 08:01 11804387
/lib/x86_64-linux-gnu/libdl-2.19.so
7f027f707000-7f027f708000 rw-p 00003000 08:01 11804387
/lib/x86_64-linux-gnu/libdl-2.19.so
7f027f708000-7f027f789000 r-xp 00000000 08:01 16780134
/usr/lib/x86_64-linux-gnu/libgmp.so.10.2.0
7f027f789000-7f027f989000 ---p 00081000 08:01 16780134
/usr/lib/x86_64-linux-gnu/libgmp.so.10.2.0
7f027f989000-7f027f98a000 r--p 00081000 08:01 16780134
/usr/lib/x86_64-linux-gnu/libgmp.so.10.2.0
7f027f98a000-7f027f98b000 rw-p 00082000 08:01 16780134
/usr/lib/x86_64-linux-gnu/libgmp.so.10.2.0
7f027f98b000-7f027f9a3000 r-xp 00000000 08:01 11804379
/lib/x86_64-linux-gnu/libpthread-2.19.so
7f027f9a3000-7f027fba2000 ---p 00018000 08:01 11804379
/lib/x86_64-linux-gnu/libpthread-2.19.so
7f027fba2000-7f027fba3000 r--p 00017000 08:01 11804379
/lib/x86_64-linux-gnu/libpthread-2.19.so
7f027fba3000-7f027fba4000 rw-p 00018000 08:01 11804379
/lib/x86_64-linux-gnu/libpthread-2.19.so
7f027fba4000-7f027fba8000 rw-p 00000000 00:00 0
7f027fba8000-7f027fbc8000 r-xp 00000000 08:01 11804381
/lib/x86_64-linux-gnu/ld-2.19.so
7f027fbd8000-7f027fc7c000 r--s 00000000 08:01 16912861
/usr/lib/debug/lib/x86_64-linux-gnu/libpthread-2.19.so
7f027fc7c000-7f027fc9e000 r--s 00000000 08:01 11804379
/lib/x86_64-linux-gnu/libpthread-2.19.so
7f027fc9e000-7f027fda6000 r--p 00000000 08:01 16783711
/usr/lib/locale/locale-archive
7f027fda6000-7f027fdab000 rw-p 00000000 00:00 0
7f027fdc1000-7f027fdc2000 rw-p 00000000 00:00 0
7f027fdc2000-7f027fdc3000 ---p 00000000 00:00 0
7f027fdc3000-7f027fdc8000 rw-p 00000000 00:00 0
[stack:11510]
7f027fdc8000-7f027fdc9000 r--p 00020000 08:01 11804381
/lib/x86_64-linux-gnu/ld-2.19.so
7f027fdc9000-7f027fdca000 rw-p 00021000 08:01 11804381
/lib/x86_64-linux-gnu/ld-2.19.so
7f027fdca000-7f027fdcb000 rw-p 00000000 00:00 0
7f027fdcb000-7f0280082000 r-xp 00000000 08:01 15073377
/home/ruby/tst1/ruby/ruby
7f0280281000-7f0280287000 rw-p 002b6000 08:01 15073377
/home/ruby/tst1/ruby/ruby
7f0280287000-7f028029a000 rw-p 00000000 00:00 0
7f0281bcb000-7f0281ff5000 rw-p 00000000 00:00 0
[heap]
7fff3036d000-7fff3038e000 rw-p 00000000 00:00 0
7fff303fc000-7fff303fe000 r-xp 00000000 00:00 0
[vdso]
7fff303fe000-7fff30400000 r--p 00000000 00:00 0
[vvar]
ffffffffff600000-ffffffffff601000 r-xp 00000000 00:00 0
[vsyscall]
[NOTE]
You may have encountered a bug in the Ruby interpreter or extension
libraries.
Bug reports are welcome.
For details: http://www.ruby-lang.org/bugreport.html