Project

General

Profile

Bug #6383

Segfault in Timeout module when compiled with GCC 4.7

Added by budu (Nicolas Buduroi) about 6 years ago. Updated about 5 years ago.

Status:
Rejected
Priority:
Normal
Assignee:
-
Target version:
ruby -v:
ruby 1.8.7 (2012-02-08 patchlevel 358) [i686-linux]
[ruby-core:44775]

Description

As described in a post (https://bbs.archlinux.org/viewtopic.php?id=139547) on the ArchLinux forum, there's an issue with Ruby 1.8.7 when compiled with GCC 4.7 on a modern Linux system. Ruby segfault as soon as we try to install a gem, although it seems to work fine for trivial things. Here's an output of the error message:

/opt/ruby1.8/lib/ruby/1.8/timeout.rb:60: [BUG] Segmentation fault
ruby 1.8.7 (2012-02-08 patchlevel 358) [i686-linux]

It can be circumvented by installing older versions of GCC but this is a very time consuming operation and it's not possible one every systems.

History

#1 [ruby-core:44869] Updated by phasis68 (Heesob Park) about 6 years ago

I can reproduce this issue on Arch Linux 3.3.4.

I guess the over-optimization of GCC 4.7 caused the segfault.

Try to build Ruby 1.8.7 with the following config options:
./configure CFLAGS="-O2 -fno-tree-dce -fno-optimize-sibling-calls"

Don't ask me why. I just found it by trial and error.

#2 [ruby-core:55490] Updated by rogerdpack (Roger Pack) about 5 years ago

(thanks for the workaround phasis68). Does this occur with gcc 4.8 anyone know? (i.e. was it a bug in 4.7 now fixed in 4.8...?)

#3 [ruby-core:55496] Updated by drbrain (Eric Hodel) about 5 years ago

  • Status changed from Open to Rejected
  • Priority changed from 5 to Normal

Sorry, but Ruby 1.8.7 is closed for bug fixes. If you can reproduce with ruby 2.0 or 1.9.3 please open a new issue.

Also available in: Atom PDF