Bug List: (This bug is not in your last search results)   Show last search results      Search page      Enter new bug
Bug#: 166527
Alias:
Product:
Component:
Status: RESOLVED
Resolution: FIXED
Assigned To: Gentoo Ruby Team <ruby@gentoo.org>
Hardware:
OS:
Version:
Priority:
Severity:
Reporter: Diego E. 'Flameeyes' Pettenò <flameeyes@gentoo.org>
Add CC:
CC:
Remove selected CCs
URL:
Summary:
Status Whiteboard:
Keywords:

Filename Description Type Creator Created Size Actions
ruby-gd-0.7.4-fix-interlace.patch Patch to fix segmentation fault with set interlace method patch Hans de Graaff 2007-04-19 20:25 0000 241 bytes Details | Diff
ruby-gd-0.7.4-r1.ebuild ruby-gd-0.7.4-r1.ebuild text/plain Hans de Graaff 2007-04-19 20:25 0000 1.58 KB Details
Create a New Attachment (proposed patch, testcase, etc.) View All

Bug 166527 depends on: Show dependency tree
Bug 166527 blocks:
Votes: 0    Show votes for this bug    Vote for this bug

Additional Comments: (this is where you put emerge --info)


Not eligible to see or edit group visibility for this bug.






View Bug Activity   |   Format For Printing   |   XML   |   Clone This Bug


Description:   Opened: 2007-02-12 17:18 0000
Both ia64 and ppc64 have dev-ruby/ruby-gd marked as stable, but the code does
not seem to be 64-bit safe. The build output hints at this already:

GD.c: In function ‘img_set_interlace’:
GD.c:1380: warning: cast to pointer from integer of different size

and trying to run the example.rb file in the distribution on amd64 results in
this:

flame@enterprise ~/devel/hacking/ruby-GD-0.7.4/sample % ruby ./example.rb
./example.rb:16: [BUG] Segmentation fault
ruby 1.8.5 (2006-12-25) [x86_64-linux]

zsh: abort (core dumped)  ruby ./example.rb

the backtrace confirms the build output suggestion:

0  0x0000003000e2f7b5 in *__GI_raise (sig=<value optimized out>) at
../nptl/sysdeps/unix/sysv/linux/raise.c:64
#1  0x0000003000e30a4e in *__GI_abort () at abort.c:88
#2  0x0000003041229c70 in rb_bug (fmt=0x30412c435b "Segmentation fault") at
error.c:214
#3  0x0000003041298a6a in sigsegv (sig=11) at signal.c:537
#4  <signal handler called>
#5  rb_check_type (x=25716344, t=34) at ruby.h:678
#6  0x00002b8a02153d40 in img_set_interlace (img=<value optimized out>, val=2)
at GD.c:1380
#7  0x00000030412355bb in rb_call0 (klass=47871731195360, recv=47871731197560,
id=19812, oid=19812, argc=<value optimized out>,
    argv=<value optimized out>, body=0x2b8a018839a0, flags=<value optimized
out>) at eval.c:5810


So the package should have likely be marked -amd64 -ia64 -ppc64 rather than
ia64 and ppc64 stable.

------- Comment #1 From Markus Rothe 2007-02-13 11:38:46 0000 -------
does work here:

markus@G5 ~ $ uname -m
ppc64
markus@G5 ~ $ ruby /usr/share/doc/ruby-gd-0.7.4/sample/example.rb > file.png
markus@G5 ~ $

and I can open that file.

------- Comment #2 From Diego E. 'Flameeyes' Pettenò 2007-02-13 11:44:57 0000 -------
Compiler version? /me starts to think GCC is crazy.

------- Comment #3 From Markus Rothe 2007-02-13 20:16:27 0000 -------
this is gcc-4.1.1-r3

------- Comment #4 From Markus Rothe 2007-03-15 19:33:23 0000 -------
guess we're out. please CC us again, if you need further information from us.

------- Comment #5 From Raúl Porcel 2007-03-26 13:53:57 0000 -------
In ia64 fails,

# ruby /usr/share/doc/ruby-gd-0.7.4/sample/example.rb > file.png
/usr/share/doc/ruby-gd-0.7.4/sample/example.rb:16: [BUG] Segmentation fault
ruby 1.8.5 (2006-12-04) [ia64-linux]

Marking -ia64. Closing.

------- Comment #6 From Hans de Graaff 2007-04-17 08:21:04 0000 -------
There seems to be a new upstream, so I've reported the problem there as well.
See http://rubyforge.org/projects/ruby-gd/

------- Comment #7 From Hans de Graaff 2007-04-19 20:24:27 0000 -------
I'm reopening this bug as I found the cause of the segmentation fault. I'm
including an updated ebuild and patch to the bug and would be happy to get
feedback on this. In particular: does this solve the segmentation fault, and
can you create a valid PNG file with the resulting ruby-GD?

------- Comment #8 From Hans de Graaff 2007-04-19 20:25:03 0000 -------
Created an attachment (id=116758) [details]
Patch to fix segmentation fault with set interlace method

------- Comment #9 From Hans de Graaff 2007-04-19 20:25:44 0000 -------
Created an attachment (id=116760) [details]
ruby-gd-0.7.4-r1.ebuild

------- Comment #10 From Raúl Porcel 2007-04-19 20:54:11 0000 -------
Yup, it works on ia64.

------- Comment #11 From Hans de Graaff 2007-04-20 05:51:33 0000 -------
Thanks for the feedback. I have committed the new ebuild and patch to CVS.

Bug List: (This bug is not in your last search results)   Show last search results      Search page      Enter new bug