Project

General

Profile

Actions

Bug #6267

closed

Segmentation fault when exponentiating complex number

Added by pabloh (Pablo Herrero) about 12 years ago. Updated about 12 years ago.

Status:
Closed
Assignee:
-
Target version:
-
ruby -v:
ruby 1.9.3p125 (2012-02-16 revision 34643) [i686-linux]
Backport:
[ruby-core:44170]

Description

A segfault is raised when running the following script, with any exponent greater or equal to 5:

require "mathn/complex"
Complex(0,1)**5

It only seems to happen when exponentiating pure imaginary numbers and if 'mathn/coplex' is loaded, otherwise it works just fine.


Files

segfaul.backtrace (7.49 KB) segfaul.backtrace backtrace pabloh (Pablo Herrero), 04/07/2012 08:15 AM
Actions #1

Updated by naruse (Yui NARUSE) about 12 years ago

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

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


  • complex.c (nucomp_expt): the result of f_complex_new2 may be a fixnum
    with mathn. [ruby-core:44170] [Bug #6267]

Updated by tadf (tadayoshi funaba) about 12 years ago

  • Status changed from Closed to Open

the following still does

Complex(0,1)**2

Updated by naruse (Yui NARUSE) about 12 years ago

  • Status changed from Open to Closed

tadf fixed it at r35265.

Actions

Also available in: Atom PDF

Like0
Like0Like0Like0