Project

General

Profile

Backport #5546

Bus error in Complex.rationalize

Added by pragdave (Dave Thomas) almost 8 years ago. Updated over 7 years ago.

Status:
Closed
Priority:
Normal
[ruby-core:40667]

Description

This only happens if you pass in a parameter to rationalize.

=begin
dave[ruby3/Book 20:05:52] ruby -ve 'p Complex(2.5, 0).rationalize(1)'
ruby 1.9.3p0 (2011-10-30 revision 33570) [x86_64-darwin11.2.0]
-e:1: [BUG] Segmentation fault
ruby 1.9.3p0 (2011-10-30 revision 33570) [x86_64-darwin11.2.0]

-- Control frame information -----------------------------------------------
c:0005 p:---- s:0013 b:0013 l:000012 d:000012 CFUNC :rationalize
c:0004 p:---- s:0011 b:0011 l:000010 d:000010 CFUNC :rationalize
c:0003 p:0022 s:0007 b:0006 l:000c98 d:0011c8 EVAL -e:1
c:0002 p:---- s:0004 b:0004 l:000003 d:000003 FINISH
c:0001 p:0000 s:0002 b:0002 l:000c98 d:000c98 TOP

-- Ruby level backtrace information ----------------------------------------
-e:1:in <main>'
-e:1:in
rationalize'
-e:1:in `rationalize'

-- C level backtrace information -------------------------------------------

See Crash Report log file under ~/Library/Logs/CrashReporter or
/Library/Logs/CrashReporter, for the more detail of.

-- Other runtime information -----------------------------------------------

  • Loaded script: -e

  • Loaded features:

0 enumerator.so
1 /Users/dave/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/1.9.1/x86_64-darwin11.2.0/enc/encdb.bundle
2 /Users/dave/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/1.9.1/x86_64-darwin11.2.0/enc/trans/transdb.bundle
3 /Users/dave/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/site_ruby/1.9.1/rubygems/defaults.rb
4 /Users/dave/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/1.9.1/x86_64-darwin11.2.0/rbconfig.rb
5 /Users/dave/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/site_ruby/1.9.1/rubygems/deprecate.rb
6 /Users/dave/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/site_ruby/1.9.1/rubygems/exceptions.rb
7 /Users/dave/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb
8 /Users/dave/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/site_ruby/1.9.1/rubygems.rb

[NOTE]
You may have encountered a bug in the Ruby interpreter or extension libraries.
Bug reports are welcome.
For details: http://www.ruby-lang.org/bugreport.html
=end

Associated revisions

Revision 292b3e41
Added by nobu (Nobuyoshi Nakada) almost 8 years ago

  • complex.c (nucomp_rationalize): fix function. [ruby-core:40667] [Bug #5546]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33613 b2dd03c8-39d4-4d8f-98ff-823fe69b080e

Revision 33613
Added by nobu (Nobuyoshi Nakada) almost 8 years ago

  • complex.c (nucomp_rationalize): fix function. [ruby-core:40667] [Bug #5546]

Revision 33613
Added by nobu (Nobuyoshi Nakada) almost 8 years ago

  • complex.c (nucomp_rationalize): fix function. [ruby-core:40667] [Bug #5546]

Revision 33613
Added by nobu (Nobuyoshi Nakada) almost 8 years ago

  • complex.c (nucomp_rationalize): fix function. [ruby-core:40667] [Bug #5546]

Revision 33613
Added by nobu (Nobuyoshi Nakada) almost 8 years ago

  • complex.c (nucomp_rationalize): fix function. [ruby-core:40667] [Bug #5546]

Revision 33613
Added by nobu (Nobuyoshi Nakada) almost 8 years ago

  • complex.c (nucomp_rationalize): fix function. [ruby-core:40667] [Bug #5546]

Revision 33613
Added by nobu (Nobuyoshi Nakada) almost 8 years ago

  • complex.c (nucomp_rationalize): fix function. [ruby-core:40667] [Bug #5546]

Revision 5ce73b51
Added by naruse (Yui NARUSE) over 7 years ago

merge revision(s) r33613:

    * complex.c (nucomp_rationalize): fix function.  [ruby-core:40667]
      [Bug #5546]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@33907 b2dd03c8-39d4-4d8f-98ff-823fe69b080e

Revision 33907
Added by naruse (Yui NARUSE) over 7 years ago

merge revision(s) r33613:

* complex.c (nucomp_rationalize): fix function.  [ruby-core:40667]
  [Bug #5546]

History

Updated by mrkn (Kenta Murata) almost 8 years ago

  • Assignee set to mrkn (Kenta Murata)
#2

Updated by nobu (Nobuyoshi Nakada) almost 8 years ago

  • Tracker changed from Backport to Bug
  • Project changed from Backport193 to Ruby master
#3

Updated by nobu (Nobuyoshi Nakada) almost 8 years ago

  • Status changed from Open to Closed
  • % Done changed from 0 to 100

This issue was solved with changeset r33613.
Dave, thank you for reporting this issue.
Your contribution to Ruby is greatly appreciated.
May Ruby be with you.


  • complex.c (nucomp_rationalize): fix function. [ruby-core:40667] [Bug #5546]
#4

Updated by nobu (Nobuyoshi Nakada) almost 8 years ago

  • Tracker changed from Bug to Backport
  • Project changed from Ruby master to Backport193

Updated by nobu (Nobuyoshi Nakada) almost 8 years ago

  • Status changed from Closed to Assigned
  • Assignee changed from mrkn (Kenta Murata) to yugui (Yuki Sonoda)
#6

Updated by naruse (Yui NARUSE) over 7 years ago

  • Status changed from Assigned to Closed

This issue was solved with changeset r33907.
Dave, thank you for reporting this issue.
Your contribution to Ruby is greatly appreciated.
May Ruby be with you.


merge revision(s) r33613:

* complex.c (nucomp_rationalize): fix function.  [ruby-core:40667]
  [Bug #5546]

Also available in: Atom PDF