Project

General

Profile

Actions

Bug #4566

closed

followup of [ruby-core:32747]

Added by jojelino (jojelino _) about 13 years ago. Updated almost 13 years ago.

Status:
Third Party's Issue
Target version:
ruby -v:
revision 31234
Backport:
[ruby-core:35683]

Description

=begin
[ruby-core:32747]

Index: vm_exec.c

--- vm_exec.c (revision 31234)
+++ vm_exec.c (working copy)
@@ -11,7 +11,7 @@

#include <math.h>

-#if VMDEBUG > 0
+#if (VMDEBUG > 0) | ((GNUC >= 4) && (GNUC_MINOR >= 6) && (GNUC_PATCHLEVEL >= 0))
#define DECL_SC_REG(type, r, reg) register type reg_##r

#elif GNUC && x86_64 && !clang

please apply this, it resolves segmentation fault in gcc > 4.6
specifying register name explicitly fails. although it worked in previous version.
if you continue using explicit register name, you gotta find workaround about it ;)
=end

Actions #1

Updated by naruse (Yui NARUSE) about 13 years ago

=begin
The patch seems wrong: first is the way check the gcc version,
and the condition also wrong.

Additional to say, I doubt that this bug is reproduced only on mingw32.
=end

Updated by jojelino (jojelino _) about 13 years ago

=begin

The patch seems wrong: first is the way check the gcc version, and the condition also wrong.

the definitive solution would be leaving only following line

:#define DECL_SC_REG(type, r, reg) register type reg_##r

I doubt that this bug is reproduced only on mingw32.

to be honest, it doesn't be reproduced without -O flag. sure it was mingw32.

so i would like to say %edi & %esi is now clobbered for >=gcc 4.6 with optimization option
enabled.
=end

Updated by naruse (Yui NARUSE) about 13 years ago

  • Status changed from Open to Assigned
  • Assignee set to nobu (Nobuyoshi Nakada)

=begin
FYI, on FreeBSD 8.1 and gcc4.6 -O3, it wokrs.
=end

Updated by kosaki (Motohiro KOSAKI) almost 13 years ago

  • Status changed from Assigned to Third Party's Issue

I'm using Linux Fedora 15 and following gcc version. It also works fine without the patch.
So, this is obviously no ruby issue. Please update gcc.

% LANG=C gcc -v
LANG=C gcc -v
Using built-in specs.
COLLECT_GCC=/usr/bin/gcc
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-redhat-linux/4.6.0/lto-wrapper
Target: x86_64-redhat-linux
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=http://bugzilla.\
redhat.com/bugzilla --enable-bootstrap --enable-shared --enable-threads=posix --enable-checking=release --with-system-zlib -
-enable-__cxa_atexit --disable-libunwind-exceptions --enable-gnu-unique-object --enable-linker-build-id --enable-languages=c
,c++,objc,obj-c++,java,fortran,ada,go,lto --enable-plugin --enable-java-awt=gtk --disable-dssi --with-java-home=/usr/lib/jvm
/java-1.5.0-gcj-1.5.0.0/jre --enable-libgcj-multifile --enable-java-maintainer-mode --with-ecj-jar=/usr/share/java/eclipse-e
cj.jar --disable-libjava-multilib --with-ppl --with-cloog --with-tune=generic --with-arch_32=i686 --build=x86_64-redhat-linu
x
Thread model: posix
gcc version 4.6.0 20110530 (Red Hat 4.6.0-9) (GCC)

Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0