[GHC] #9753: Segmentation fault when applying ** to a complex number
GHC
ghc-devs at haskell.org
Sat Nov 1 19:33:28 UTC 2014
#9753: Segmentation fault when applying ** to a complex number
----------------------------------------+---------------------------
Reporter: AlexeiKopylov | Owner:
Type: bug | Status: new
Priority: normal | Milestone:
Component: GHCi | Version: 7.6.3
Resolution: | Keywords:
Operating System: MacOS X | Architecture: ia64
Type of failure: GHCi crash | Difficulty: Unknown
Test Case: | Blocked By:
Blocking: | Related Tickets:
Differential Revisions: |
----------------------------------------+---------------------------
Old description:
> Rising a negative complex number to a power using {{{**}}} in ghci causes
> a segmentation fault:
> {{{
> $ ghci
> GHCi, version 7.6.3: http://www.haskell.org/ghc/ :? for help
> Loading package ghc-prim ... linking ... done.
> Loading package integer-gmp ... linking ... done.
> Loading package base ... linking ... done.
> Prelude> :m +Data.Complex
> Prelude Data.Complex> (-1) ** 1 :: Complex Double
> Segmentation fault
> }}}
New description:
Rising a negative complex number to a power using {{{**}}} in ghci causes
a segmentation fault:
{{{
$ ghci
GHCi, version 7.6.3: http://www.haskell.org/ghc/ :? for help
Loading package ghc-prim ... linking ... done.
Loading package integer-gmp ... linking ... done.
Loading package base ... linking ... done.
Prelude> :m +Data.Complex
Prelude Data.Complex> (-1) ** 1 :: Complex Double
Segmentation fault
}}}
--
Comment (by thomie):
I can not reproduce this problem on Linux, neither with 7.6.3, nor with
7.8.3:
{{{
$ ghci
GHCi, version 7.8.3: http://www.haskell.org/ghc/ :? for help
Loading package ghc-prim ... linking ... done.
Loading package integer-gmp ... linking ... done.
Loading package base ... linking ... done.
Prelude> :m +Data.Complex
Prelude Data.Complex> (-1) ** 1 :: Complex Double
(-1.0) :+ (-1.2246467991473532e-16)
}}}
Can you try with GHC 7.8.3?
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/9753#comment:2>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list