Issue #15272 has been reported by bannable (Joe Truba).

----------------------------------------
Bug #15272: Segfault (type confusion?) in literal_concat
https://bugs.ruby-lang.org/issues/15272

* Author: bannable (Joe Truba)
* Status: Open
* Priority: Normal
* Assignee: 
* Target version: 
* ruby -v: ruby 2.6.0dev (2018-10-26 trunk 65379) [x86_64-linux]
* Backport: 2.3: UNKNOWN, 2.4: UNKNOWN, 2.5: UNKNOWN
----------------------------------------
Reproducer:
~~~
jtruba@dev118:~/rubies/ruby-trunk$ xxd ../repro5
00000000: 3c3c 7e30 270a 200a 3023 7b7d 0a30       <<~0'. .0#{}.0
jtruba@dev118:~/rubies/ruby-trunk$
~~~

Crash:
~~~
jtruba@dev118:~/rubies/ruby-trunk$ ./ruby ../repro5                                                                                                                                                                                                                                                                                                                                                                                 [41/666]
../repro5:1: unterminated string meets end of file
<<~0'

../repro5: [BUG] Segmentation fault at 0x0000000000000009
ruby 2.6.0dev (2018-10-26 trunk 65379) [x86_64-linux]

-- Control frame information -----------------------------------------------
c:0001 p:0000 s:0003 E:000730 (none) [FINISH]


-- Machine register context ------------------------------------------------
 RIP: 0x000055c102fcf703 RBP: 0x00007febd90127b0 RSP: 0x00007fff808c0310
 RAX: 0x00007febd9012720 RBX: 0x00007febd9012630 RCX: 0x0000000000000001
 RDX: 0x00007febd90127b0 RDI: 0x00007febd9172800 RSI: 0x00007febd9012630
  R8: 0x000055c10365dd30  R9: 0xfffffffffffffffc R10: 0x00000000fffffffe
 R11: 0x000055c10365dd30 R12: 0x00007fff808c0428 R13: 0x00007febd9012630
 R14: 0x00007febd9012648 R15: 0xfffffffffffffffc EFL: 0x0000000000010202

-- C level backtrace information -------------------------------------------
/home/jtruba/rubies/ruby-trunk/ruby(rb_print_backtrace+0x14) [0x55c103368410] vm_dump.c:715
/home/jtruba/rubies/ruby-trunk/ruby(rb_vm_bugreport) vm_dump.c:985
/home/jtruba/rubies/ruby-trunk/ruby(bug_report_end+0x0) [0x55c103343400] error.c:610
/home/jtruba/rubies/ruby-trunk/ruby(rb_bug_context) error.c:610
/home/jtruba/rubies/ruby-trunk/ruby(sigsegv+0x6f) [0x55c1030be46f] signal.c:998
/lib/x86_64-linux-gnu/libpthread.so.0(__restore_rt+0x0) [0x7febdaab5890] ../nptl/sysdeps/pthread/funlockfile.c:29
/home/jtruba/rubies/ruby-trunk/ruby(literal_concat+0x443) [0x55c102fcf703] parse.y:8497
./ruby(0x55c102fbbc3b) [0x55c102fbbc3b]
/home/jtruba/rubies/ruby-trunk/ruby(yycompile0+0x66c) [0x55c102fd560c] parse.y:4888
/home/jtruba/rubies/ruby-trunk/ruby(rb_suppress_tracing+0x219) [0x55c103208c69] vm_trace.c:403
/home/jtruba/rubies/ruby-trunk/ruby(yycompile+0x49) [0x55c102fd32ed] parse.y:4932
/home/jtruba/rubies/ruby-trunk/ruby(rb_parser_compile_file_path) parse.y:5071
/home/jtruba/rubies/ruby-trunk/ruby(load_file_internal+0xbe0) [0x55c1030b1c60] ruby.c:1994
/home/jtruba/rubies/ruby-trunk/ruby(rb_ensure+0x1c9) [0x55c102e7fd29] eval.c:1052
/home/jtruba/rubies/ruby-trunk/ruby(load_file+0x49) [0x55c1030b0221] ruby.c:2113
/home/jtruba/rubies/ruby-trunk/ruby(process_options) ruby.c:1773
/home/jtruba/rubies/ruby-trunk/ruby(ruby_process_options) ruby.c:2346
/home/jtruba/rubies/ruby-trunk/ruby(ruby_options+0x222) [0x55c102e7d392] eval.c:118
/home/jtruba/rubies/ruby-trunk/ruby(main+0x90) [0x55c102e78e40] ./main.c:42

-- Other runtime information -----------------------------------------------

* Loaded script: ../repro5

* Loaded features:

    0 enumerator.so
    1 thread.rb
    2 rational.so
    3 complex.so
    4 /home/jtruba/.rubies/ruby-trunk/lib/ruby/2.6.0/x86_64-linux/enc/encdb.so
    5 /home/jtruba/.rubies/ruby-trunk/lib/ruby/2.6.0/x86_64-linux/enc/trans/transdb.so

* Process memory map:

55c102e50000-55c103459000 r-xp 00000000 103:00 78000810                  /home/jtruba/rubies/ruby-trunk/ruby
55c103658000-55c10365e000 rw-p 00608000 103:00 78000810                  /home/jtruba/rubies/ruby-trunk/ruby
55c10365e000-55c103680000 rw-p 00000000 00:00 0
7febd7888000-7febd7a31000 r--s 00000000 103:03 786457                    /lib/x86_64-linux-gnu/libc-2.19.so
7febd7a31000-7febd89e5000 r--s 00000000 103:00 78000810                  /home/jtruba/rubies/ruby-trunk/ruby
7febd89e5000-7febd89fb000 r-xp 00000000 103:03 786893                    /lib/x86_64-linux-gnu/libgcc_s.so.1
7febd89fb000-7febd8bfa000 ---p 00016000 103:03 786893                    /lib/x86_64-linux-gnu/libgcc_s.so.1
7febd8bfa000-7febd8bfb000 rw-p 00015000 103:03 786893                    /lib/x86_64-linux-gnu/libgcc_s.so.1
7febd8bfb000-7febd8bfd000 r-xp 00000000 103:00 80759003                  /home/jtruba/.rubies/ruby-trunk/lib/ruby/2.6.0/x86_64-linux/enc/trans/transdb.so
7febd8bfd000-7febd8dfd000 ---p 00002000 103:00 80759003                  /home/jtruba/.rubies/ruby-trunk/lib/ruby/2.6.0/x86_64-linux/enc/trans/transdb.so
7febd8dfd000-7febd8dfe000 rw-p 00002000 103:00 80759003                  /home/jtruba/.rubies/ruby-trunk/lib/ruby/2.6.0/x86_64-linux/enc/trans/transdb.so
7febd8dfe000-7febd8e00000 r-xp 00000000 103:00 80759038                  /home/jtruba/.rubies/ruby-trunk/lib/ruby/2.6.0/x86_64-linux/enc/encdb.so
7febd8e00000-7febd8fff000 ---p 00002000 103:00 80759038                  /home/jtruba/.rubies/ruby-trunk/lib/ruby/2.6.0/x86_64-linux/enc/encdb.so
7febd8fff000-7febd9000000 rw-p 00001000 103:00 80759038                  /home/jtruba/.rubies/ruby-trunk/lib/ruby/2.6.0/x86_64-linux/enc/encdb.so
7febd9000000-7febd9800000 rw-p 00000000 00:00 0
7febd9858000-7febd98fc000 r--s 00000000 103:03 660408                    /usr/lib/debug/lib/x86_64-linux-gnu/libpthread-2.19.so
7febd98fc000-7febd9a9d000 r-xp 00000000 103:03 786457                    /lib/x86_64-linux-gnu/libc-2.19.so
7febd9a9d000-7febd9c9d000 ---p 001a1000 103:03 786457                    /lib/x86_64-linux-gnu/libc-2.19.so
7febd9c9d000-7febd9ca1000 r--p 001a1000 103:03 786457                    /lib/x86_64-linux-gnu/libc-2.19.so
7febd9ca1000-7febd9ca3000 rw-p 001a5000 103:03 786457                    /lib/x86_64-linux-gnu/libc-2.19.so
7febd9ca3000-7febd9ca7000 rw-p 00000000 00:00 0
7febd9ca7000-7febd9da7000 r-xp 00000000 103:03 786463                    /lib/x86_64-linux-gnu/libm-2.19.so
7febd9da7000-7febd9fa6000 ---p 00100000 103:03 786463                    /lib/x86_64-linux-gnu/libm-2.19.so
7febd9fa6000-7febd9fa7000 r--p 000ff000 103:03 786463                    /lib/x86_64-linux-gnu/libm-2.19.so
7febd9fa7000-7febd9fa8000 rw-p 00100000 103:03 786463                    /lib/x86_64-linux-gnu/libm-2.19.so
7febd9fa8000-7febd9fb0000 r-xp 00000000 103:03 786461                    /lib/x86_64-linux-gnu/libcrypt-2.19.so
7febd9fb0000-7febda1af000 ---p 00008000 103:03 786461                    /lib/x86_64-linux-gnu/libcrypt-2.19.so
7febda1af000-7febda1b0000 r--p 00007000 103:03 786461                    /lib/x86_64-linux-gnu/libcrypt-2.19.so
7febda1b0000-7febda1b1000 rw-p 00008000 103:03 786461                    /lib/x86_64-linux-gnu/libcrypt-2.19.so
7febda1b1000-7febda1df000 rw-p 00000000 00:00 0
7febda1df000-7febda1e2000 r-xp 00000000 103:03 786462                    /lib/x86_64-linux-gnu/libdl-2.19.so
7febda1e2000-7febda3e1000 ---p 00003000 103:03 786462                    /lib/x86_64-linux-gnu/libdl-2.19.so
7febda3e1000-7febda3e2000 r--p 00002000 103:03 786462                    /lib/x86_64-linux-gnu/libdl-2.19.so
7febda3e2000-7febda3e3000 rw-p 00003000 103:03 786462                    /lib/x86_64-linux-gnu/libdl-2.19.so
7febda3e3000-7febda464000 r-xp 00000000 103:03 266462                    /usr/lib/x86_64-linux-gnu/libgmp.so.10.2.0
7febda464000-7febda664000 ---p 00081000 103:03 266462                    /usr/lib/x86_64-linux-gnu/libgmp.so.10.2.0
7febda664000-7febda665000 r--p 00081000 103:03 266462                    /usr/lib/x86_64-linux-gnu/libgmp.so.10.2.0
7febda665000-7febda666000 rw-p 00082000 103:03 266462                    /usr/lib/x86_64-linux-gnu/libgmp.so.10.2.0
7febda666000-7febda69a000 r-xp 00000000 103:03 279726                    /usr/lib/x86_64-linux-gnu/libjemalloc.so.1
7febda69a000-7febda89a000 ---p 00034000 103:03 279726                    /usr/lib/x86_64-linux-gnu/libjemalloc.so.1
7febda89a000-7febda89c000 r--p 00034000 103:03 279726                    /usr/lib/x86_64-linux-gnu/libjemalloc.so.1
7febda89c000-7febda89d000 rw-p 00036000 103:03 279726                    /usr/lib/x86_64-linux-gnu/libjemalloc.so.1
7febda89d000-7febda89e000 rw-p 00000000 00:00 0
7febda89e000-7febda8a5000 r-xp 00000000 103:03 786474                    /lib/x86_64-linux-gnu/librt-2.19.so
7febda8a5000-7febdaaa4000 ---p 00007000 103:03 786474                    /lib/x86_64-linux-gnu/librt-2.19.so
7febdaaa4000-7febdaaa5000 r--p 00006000 103:03 786474                    /lib/x86_64-linux-gnu/librt-2.19.so
7febdaaa5000-7febdaaa6000 rw-p 00007000 103:03 786474                    /lib/x86_64-linux-gnu/librt-2.19.so
7febdaaa6000-7febdaabe000 r-xp 00000000 103:03 786451                    /lib/x86_64-linux-gnu/libpthread-2.19.so
7febdaabe000-7febdacbd000 ---p 00018000 103:03 786451                    /lib/x86_64-linux-gnu/libpthread-2.19.so
7febdacbd000-7febdacbe000 r--p 00017000 103:03 786451                    /lib/x86_64-linux-gnu/libpthread-2.19.so
7febdacbe000-7febdacbf000 rw-p 00018000 103:03 786451                    /lib/x86_64-linux-gnu/libpthread-2.19.so
7febdacbf000-7febdacc3000 rw-p 00000000 00:00 0
7febdacc3000-7febdace4000 r-xp 00000000 103:03 786452                    /lib/x86_64-linux-gnu/ld-2.19.so
7febdad1f000-7febdad41000 r--s 00000000 103:03 786451                    /lib/x86_64-linux-gnu/libpthread-2.19.so
7febdad41000-7febdaeca000 r--p 00000000 103:03 283083                    /usr/lib/locale/locale-archive
7febdaeca000-7febdaed0000 rw-p 00000000 00:00 0
7febdaee0000-7febdaee1000 rw-p 00000000 00:00 0
7febdaee1000-7febdaee3000 rw-p 00000000 00:00 0
7febdaee3000-7febdaee4000 r--p 00020000 103:03 786452                    /lib/x86_64-linux-gnu/ld-2.19.so
7febdaee4000-7febdaee5000 rw-p 00021000 103:03 786452                    /lib/x86_64-linux-gnu/ld-2.19.so
7febdaee5000-7febdaee6000 rw-p 00000000 00:00 0
7fff800c6000-7fff808c5000 rw-p 00000000 00:00 0                          [stack]
7fff80976000-7fff80978000 r--p 00000000 00:00 0                          [vvar]
7fff80978000-7fff8097a000 r-xp 00000000 00:00 0                          [vdso]
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: https://www.ruby-lang.org/bugreport.html

Aborted
~~~



-- 
https://bugs.ruby-lang.org/

Unsubscribe: <mailto:ruby-core-request / ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>