[ruby-core:77394] [Ruby trunk Bug#12670] Segmentation fault on `Magick::Image#get_pixels` on ruby since ruby-2.2

From: nagachika00@...
Date: 2016-09-26 02:44:04 UTC
List: ruby-core #77394
Issue #12670 has been updated by Tomoyuki Chikanaga.

Backport changed from 2.1: UNKNOWN, 2.2: UNKNOWN, 2.3: UNKNOWN to 2.1: UNKNOWN, 2.2: UNKNOWN, 2.3: REQUIRED

wanabe san, thank you for your great investigation!

Sasada san, could you take a look at the lines wanabe san pointed out?

----------------------------------------
Bug #12670: Segmentation fault on `Magick::Image#get_pixels` on ruby since ruby-2.2
https://bugs.ruby-lang.org/issues/12670#change-60646

* Author: Pavel Lobashov
* Status: Assigned
* Priority: Normal
* Assignee: Koichi Sasada
* ruby -v: 2.31
* Backport: 2.1: UNKNOWN, 2.2: UNKNOWN, 2.3: REQUIRED
----------------------------------------
1. Create test.rb this code

~~~ ruby
require 'rmagick'
include Magick

(0..10).each do |_|
  ImageList.new('1.bmp').get_pixels(0, 0, 1600, 800).each_slice(1600).to_a
end
~~~
2. Create any 1.bmp file with dimension at least 1600*800 (Include zip file with it, extract it in directory with test.tb)
3. Install ruby 2.1.9 (via RVM for example) and run

~~~ text
  ruby -v # ruby 2.1.9p490 (2016-03-30 revision 54437) [x86_64-linux]
  ruby test.rb # Nothing output, all good
~~~

4. Install ruby 2.3.1 (via RVM for example) and run

~~~ text
  ruby 2.3.1p112 (2016-04-26 revision 54768) [x86_64-linux]
  ruby test.rb # You get a big log of Segmentation failed
~~~

I issued an problem on `rmagick` issue tracker (https://github.com/rmagick/rmagick/issues/212) but there is no progress at all
So I thought since both rubies use same version of rmagick I think problem may be in ruby itself.

---Files--------------------------------
out.log (25.8 KB)
1.bmp.zip (37.7 KB)


-- 
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>

In This Thread

Prev Next