Watson1978
5/25/2019 - 8:08 PM

gistfile1.txt

$ rake
mkdir -p tmp/x86_64-darwin17/RMagick2/2.3.8
cd tmp/x86_64-darwin17/RMagick2/2.3.8
/Users/watson/.rbenv/versions/2.3.8/bin/ruby -I. ../../../../ext/RMagick/extconf.rb
checking for brew... yes
checking for clang... yes
checking for pkg-config... yes
checking for outdated ImageMagick version (<= 6.7.7)... no
Usage: file [-bcEhikLlNnprsvzZ0] [-e test] [-f namefile] [-F separator] [-m magicfiles] [-M magicfiles] file...
       file -C -m magicfiles
Try `file --help' for more information.
checking for __GNUC__... yes
checking for Ruby version >= 2.3.0... yes
checking for magick/MagickCore.h... yes
checking for GetImageChannelEntropy() in assert.h,ctype.h,stdio.h,stdlib.h,math.h,time.h,sys/types.h,magick/MagickCore.h... no
checking for SetImageGray() in assert.h,ctype.h,stdio.h,stdlib.h,math.h,time.h,sys/types.h,magick/MagickCore.h... no
creating extconf.h
creating Makefile


======================================================================
Sun 26 May 19 05:02:13
This installation of RMagick 3.1.0 is configured for
Ruby 2.3.8 (x86_64-darwin17) and ImageMagick 6.7.7
======================================================================


Configured compile options: {:magick_version=>"6.7.7", :local_libs=>" -L/Users/watson/imagemagick6.7/lib -lMagickCore", :cflags=>" -I/Users/watson/imagemagick6.7/include/ImageMagick -std=gnu99", :cppflags=>" -I/Users/watson/imagemagick6.7/include/ImageMagick", :ldflags=>" -L/Users/watson/imagemagick6.7/lib -lMagickCore", :defs=>[], :config_h=>"Makefile rmagick.h"}
cd -
cd tmp/x86_64-darwin17/RMagick2/2.3.8
/usr/bin/make
compiling ../../../../ext/RMagick/rmagick.c
compiling ../../../../ext/RMagick/rmdraw.c
compiling ../../../../ext/RMagick/rmenum.c
compiling ../../../../ext/RMagick/rmfill.c
compiling ../../../../ext/RMagick/rmilist.c
compiling ../../../../ext/RMagick/rmimage.c
compiling ../../../../ext/RMagick/rminfo.c
compiling ../../../../ext/RMagick/rmkinfo.c
compiling ../../../../ext/RMagick/rmmain.c
compiling ../../../../ext/RMagick/rmmontage.c
compiling ../../../../ext/RMagick/rmpixel.c
compiling ../../../../ext/RMagick/rmstruct.c
compiling ../../../../ext/RMagick/rmutil.c
linking shared-object RMagick2.bundle
cd -
mkdir -p tmp/x86_64-darwin17/stage/lib
install -c tmp/x86_64-darwin17/RMagick2/2.3.8/RMagick2.bundle lib/RMagick2.bundle
cp tmp/x86_64-darwin17/RMagick2/2.3.8/RMagick2.bundle tmp/x86_64-darwin17/stage/lib/RMagick2.bundle
/Users/watson/.rbenv/versions/2.3.8/bin/ruby -I/Users/watson/.rbenv/versions/2.3.8/lib/ruby/gems/2.3.0/gems/rspec-support-3.8.0/lib:/Users/watson/.rbenv/versions/2.3.8/lib/ruby/gems/2.3.0/gems/rspec-core-3.8.0/lib /Users/watson/.rbenv/versions/2.3.8/lib/ruby/gems/2.3.0/gems/rspec-core-3.8.0/exe/rspec --pattern spec/\*\*\{,/\*/\*\*\}/\*_spec.rb

Randomized with seed 2402
*.=================================================================
==85143==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x6040004ad940 at pc 0x00010dea826b bp 0x7ffee28ff040 sp 0x7ffee28fe7e8
READ of size 49 at 0x6040004ad940 thread T0
    #0 0x10dea826a in wrap_strlen (libclang_rt.asan_osx_dynamic.dylib:x86_64h+0x1626a)
    #1 0x11233231a in ConstantString string.c:699
    #2 0x1122d4ff9 in SetImageProperty (libMagickCore.5.dylib:x86_64+0x129ff9)
    #3 0x112389b83 in ReadGIFImage (libMagickCore.5.dylib:x86_64+0x1deb83)
    #4 0x1121fcab8 in ReadImage constitute.c:535
    #5 0x1121548f8 in rd_image (RMagick2.bundle:x86_64+0x1d8f8)
    #6 0x112155d43 in Image_read (RMagick2.bundle:x86_64+0x1ed43)
    #7 0x10d92602a in call_cfunc_1 vm_insnhelper.c:1475
    #8 0x10d92241e in vm_call_cfunc_with_frame vm_insnhelper.c:1642
    #9 0x10d9141e1 in vm_call_cfunc vm_insnhelper.c:1737
    #10 0x10d911701 in vm_call_method_each_type vm_insnhelper.c:2026
    #11 0x10d910f52 in vm_call_method vm_insnhelper.c:2151
    #12 0x10d910c94 in vm_call_general vm_insnhelper.c:2194
    #13 0x10d8cc323 in vm_exec_core insns.def:994
    #14 0x10d903089 in vm_exec vm.c:1693
    #15 0x10d93cf5b in invoke_bmethod vm.c:942
    #16 0x10d93bc6e in invoke_block_from_c_0 vm.c:976
    #17 0x10d942b49 in invoke_block_from_c_unsplattable vm.c:998
    #18 0x10d90050b in vm_invoke_bmethod vm.c:1062
    #19 0x10d924a4c in vm_call_bmethod_body vm_insnhelper.c:1766
    #20 0x10d915021 in vm_call_bmethod vm_insnhelper.c:1784
    #21 0x10d911f43 in vm_call_method_each_type vm_insnhelper.c:2049
    #22 0x10d910f52 in vm_call_method vm_insnhelper.c:2151
    #23 0x10d916b93 in vm_call_super_method vm_insnhelper.c:2202
    #24 0x10d8cc98f in vm_exec_core insns.def:1014
    #25 0x10d903089 in vm_exec vm.c:1693
    #26 0x10d93c44c in invoke_block vm.c:921
    #27 0x10d93bc3b in invoke_block_from_c_0 vm.c:973
    #28 0x10d93b06c in invoke_block_from_c_splattable vm.c:990
    #29 0x10d93af67 in vm_yield vm.c:1025
    #30 0x10d8f3661 in rb_yield_0 vm_eval.c:1013
    #31 0x10d8f35c6 in rb_yield_1 vm_eval.c:1019
    #32 0x10d8f36a3 in rb_yield vm_eval.c:1029
    #33 0x10d43d23b in rb_hash_fetch_m hash.c:866
    #34 0x10d925f89 in call_cfunc_m1 vm_insnhelper.c:1463
    #35 0x10d92241e in vm_call_cfunc_with_frame vm_insnhelper.c:1642
    #36 0x10d9141e1 in vm_call_cfunc vm_insnhelper.c:1737
    #37 0x10d911701 in vm_call_method_each_type vm_insnhelper.c:2026
    #38 0x10d910f52 in vm_call_method vm_insnhelper.c:2151
    #39 0x10d910c94 in vm_call_general vm_insnhelper.c:2194
    #40 0x10d8cb9aa in vm_exec_core insns.def:963
    #41 0x10d903089 in vm_exec vm.c:1693
    #42 0x10d93c44c in invoke_block vm.c:921
    #43 0x10d93bc3b in invoke_block_from_c_0 vm.c:973
    #44 0x10d93b06c in invoke_block_from_c_splattable vm.c:990
    #45 0x10d93af67 in vm_yield vm.c:1025
    #46 0x10d8f3661 in rb_yield_0 vm_eval.c:1013
    #47 0x10d8f35c6 in rb_yield_1 vm_eval.c:1019
    #48 0x10d8f36a3 in rb_yield vm_eval.c:1029
    #49 0x10d43d23b in rb_hash_fetch_m hash.c:866
    #50 0x10d925f89 in call_cfunc_m1 vm_insnhelper.c:1463
    #51 0x10d92241e in vm_call_cfunc_with_frame vm_insnhelper.c:1642
    #52 0x10d9141e1 in vm_call_cfunc vm_insnhelper.c:1737
    #53 0x10d911701 in vm_call_method_each_type vm_insnhelper.c:2026
    #54 0x10d910f52 in vm_call_method vm_insnhelper.c:2151
    #55 0x10d910c94 in vm_call_general vm_insnhelper.c:2194
    #56 0x10d8cb9aa in vm_exec_core insns.def:963
    #57 0x10d903089 in vm_exec vm.c:1693
    #58 0x10d93cf5b in invoke_bmethod vm.c:942
    #59 0x10d93bc6e in invoke_block_from_c_0 vm.c:976
    #60 0x10d942b49 in invoke_block_from_c_unsplattable vm.c:998
    #61 0x10d90050b in vm_invoke_bmethod vm.c:1062
    #62 0x10d924a4c in vm_call_bmethod_body vm_insnhelper.c:1766
    #63 0x10d915021 in vm_call_bmethod vm_insnhelper.c:1784
    #64 0x10d911f43 in vm_call_method_each_type vm_insnhelper.c:2049
    #65 0x10d910f52 in vm_call_method vm_insnhelper.c:2151
    #66 0x10d910c94 in vm_call_general vm_insnhelper.c:2194
    #67 0x10d8cc323 in vm_exec_core insns.def:994
    #68 0x10d903089 in vm_exec vm.c:1693
    #69 0x10d93c44c in invoke_block vm.c:921
    #70 0x10d93bc3b in invoke_block_from_c_0 vm.c:973
    #71 0x10d942b49 in invoke_block_from_c_unsplattable vm.c:998
    #72 0x10d900a22 in vm_invoke_proc vm.c:1046
    #73 0x10d90049b in rb_vm_invoke_proc vm.c:1074
    #74 0x10d9168f9 in vm_call_opt_call vm_insnhelper.c:1868
    #75 0x10d8cc323 in vm_exec_core insns.def:994
    #76 0x10d903089 in vm_exec vm.c:1693
    #77 0x10d93c44c in invoke_block vm.c:921
    #78 0x10d93bc3b in invoke_block_from_c_0 vm.c:973
    #79 0x10d93b06c in invoke_block_from_c_splattable vm.c:990
    #80 0x10d8f78d6 in vm_yield_with_cref vm.c:1018
    #81 0x10d8f836c in yield_under vm_eval.c:1605
    #82 0x10d8f7fe2 in rb_obj_instance_exec vm_eval.c:1739
    #83 0x10d925f89 in call_cfunc_m1 vm_insnhelper.c:1463
    #84 0x10d92241e in vm_call_cfunc_with_frame vm_insnhelper.c:1642
    #85 0x10d9141e1 in vm_call_cfunc vm_insnhelper.c:1737
    #86 0x10d911701 in vm_call_method_each_type vm_insnhelper.c:2026
    #87 0x10d910f52 in vm_call_method vm_insnhelper.c:2151
    #88 0x10d910c94 in vm_call_general vm_insnhelper.c:2194
    #89 0x10d8cb9aa in vm_exec_core insns.def:963
    #90 0x10d903089 in vm_exec vm.c:1693
    #91 0x10d93c44c in invoke_block vm.c:921
    #92 0x10d93bc3b in invoke_block_from_c_0 vm.c:973
    #93 0x10d93b06c in invoke_block_from_c_splattable vm.c:990
    #94 0x10d93af67 in vm_yield vm.c:1025
    #95 0x10d8f3661 in rb_yield_0 vm_eval.c:1013
    #96 0x10d8f35c6 in rb_yield_1 vm_eval.c:1019
    #97 0x10d8f36a3 in rb_yield vm_eval.c:1029
    #98 0x10d2d8d01 in rb_ary_collect array.c:2733
    #99 0x10d925fb2 in call_cfunc_0 vm_insnhelper.c:1469
    #100 0x10d92241e in vm_call_cfunc_with_frame vm_insnhelper.c:1642
    #101 0x10d9141e1 in vm_call_cfunc vm_insnhelper.c:1737
    #102 0x10d8cb9aa in vm_exec_core insns.def:963
    #103 0x10d903089 in vm_exec vm.c:1693
    #104 0x10d93c44c in invoke_block vm.c:921
    #105 0x10d93bc3b in invoke_block_from_c_0 vm.c:973
    #106 0x10d93b06c in invoke_block_from_c_splattable vm.c:990
    #107 0x10d93af67 in vm_yield vm.c:1025
    #108 0x10d8f3661 in rb_yield_0 vm_eval.c:1013
    #109 0x10d8f35c6 in rb_yield_1 vm_eval.c:1019
    #110 0x10d8f36a3 in rb_yield vm_eval.c:1029
    #111 0x10d2d8d01 in rb_ary_collect array.c:2733
    #112 0x10d925fb2 in call_cfunc_0 vm_insnhelper.c:1469
    #113 0x10d92241e in vm_call_cfunc_with_frame vm_insnhelper.c:1642
    #114 0x10d9141e1 in vm_call_cfunc vm_insnhelper.c:1737
    #115 0x10d911701 in vm_call_method_each_type vm_insnhelper.c:2026
    #116 0x10d910f52 in vm_call_method vm_insnhelper.c:2151
    #117 0x10d910c94 in vm_call_general vm_insnhelper.c:2194
    #118 0x10d8cb9aa in vm_exec_core insns.def:963
    #119 0x10d903089 in vm_exec vm.c:1693
    #120 0x10d906c7c in rb_iseq_eval_main vm.c:1936
    #121 0x10d3aa81c in ruby_exec_internal eval.c:245
    #122 0x10d3aa3f6 in ruby_exec_node eval.c:310
    #123 0x10d3aa226 in ruby_run_node eval.c:302
    #124 0x10d2bf147 in main main.c:36
    #125 0x7fff5596a014 in start (libdyld.dylib:x86_64+0x1014)

0x6040004ad940 is located 0 bytes to the right of 48-byte region [0x6040004ad910,0x6040004ad940)
allocated by thread T0 here:
    #0 0x10dee92d7 in wrap_realloc (libclang_rt.asan_osx_dynamic.dylib:x86_64h+0x572d7)
    #1 0x1122a77c3 in ResizeMagickMemory memory.c:874
    #2 0x1122a787f in ResizeQuantumMemory memory.c:939
    #3 0x112389a4e in ReadGIFImage (libMagickCore.5.dylib:x86_64+0x1dea4e)
    #4 0x1121fcab8 in ReadImage constitute.c:535
    #5 0x1121548f8 in rd_image (RMagick2.bundle:x86_64+0x1d8f8)
    #6 0x112155d43 in Image_read (RMagick2.bundle:x86_64+0x1ed43)
    #7 0x10d92602a in call_cfunc_1 vm_insnhelper.c:1475
    #8 0x10d92241e in vm_call_cfunc_with_frame vm_insnhelper.c:1642
    #9 0x10d9141e1 in vm_call_cfunc vm_insnhelper.c:1737
    #10 0x10d911701 in vm_call_method_each_type vm_insnhelper.c:2026
    #11 0x10d910f52 in vm_call_method vm_insnhelper.c:2151
    #12 0x10d910c94 in vm_call_general vm_insnhelper.c:2194
    #13 0x10d8cc323 in vm_exec_core insns.def:994
    #14 0x10d903089 in vm_exec vm.c:1693
    #15 0x10d93cf5b in invoke_bmethod vm.c:942
    #16 0x10d93bc6e in invoke_block_from_c_0 vm.c:976
    #17 0x10d942b49 in invoke_block_from_c_unsplattable vm.c:998
    #18 0x10d90050b in vm_invoke_bmethod vm.c:1062
    #19 0x10d924a4c in vm_call_bmethod_body vm_insnhelper.c:1766
    #20 0x10d915021 in vm_call_bmethod vm_insnhelper.c:1784
    #21 0x10d911f43 in vm_call_method_each_type vm_insnhelper.c:2049
    #22 0x10d910f52 in vm_call_method vm_insnhelper.c:2151
    #23 0x10d916b93 in vm_call_super_method vm_insnhelper.c:2202
    #24 0x10d8cc98f in vm_exec_core insns.def:1014
    #25 0x10d903089 in vm_exec vm.c:1693
    #26 0x10d93c44c in invoke_block vm.c:921
    #27 0x10d93bc3b in invoke_block_from_c_0 vm.c:973
    #28 0x10d93b06c in invoke_block_from_c_splattable vm.c:990
    #29 0x10d93af67 in vm_yield vm.c:1025

SUMMARY: AddressSanitizer: heap-buffer-overflow (libclang_rt.asan_osx_dynamic.dylib:x86_64h+0x1626a) in wrap_strlen
Shadow bytes around the buggy address:
  0x1c0800095ad0: fa fa 00 00 00 00 04 fa fa fa 00 00 00 00 00 fa
  0x1c0800095ae0: fa fa 00 00 00 00 02 fa fa fa 00 00 00 00 03 fa
  0x1c0800095af0: fa fa 00 00 00 00 02 fa fa fa 00 00 00 00 03 fa
  0x1c0800095b00: fa fa 00 00 00 00 00 02 fa fa 00 00 00 00 02 fa
  0x1c0800095b10: fa fa 00 00 00 00 01 fa fa fa fd fd fd fd fd fd
=>0x1c0800095b20: fa fa 00 00 00 00 00 00[fa]fa fa fa fa fa fa fa
  0x1c0800095b30: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
  0x1c0800095b40: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
  0x1c0800095b50: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
  0x1c0800095b60: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
  0x1c0800095b70: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
Shadow byte legend (one shadow byte represents 8 application bytes):
  Addressable:           00
  Partially addressable: 01 02 03 04 05 06 07
  Heap left redzone:       fa
  Freed heap region:       fd
  Stack left redzone:      f1
  Stack mid redzone:       f2
  Stack right redzone:     f3
  Stack after return:      f5
  Stack use after scope:   f8
  Global redzone:          f9
  Global init order:       f6
  Poisoned by user:        f7
  Container overflow:      fc
  Array cookie:            ac
  Intra object redzone:    bb
  ASan internal:           fe
  Left alloca redzone:     ca
  Right alloca redzone:    cb
==85143==ABORTING
/Users/watson/.rbenv/versions/2.3.8/bin/ruby -I/Users/watson/.rbenv/versions/2.3.8/lib/ruby/gems/2.3.0/gems/rspec-support-3.8.0/lib:/Users/watson/.rbenv/versions/2.3.8/lib/ruby/gems/2.3.0/gems/rspec-core-3.8.0/lib /Users/watson/.rbenv/versions/2.3.8/lib/ruby/gems/2.3.0/gems/rspec-core-3.8.0/exe/rspec --pattern spec/\*\*\{,/\*/\*\*\}/\*_spec.rb failed