#4867: Incorrect result from trig functions
-------------------------------+--------------------------------------------
Reporter: gwright | Owner:
Type: bug | Status: new
Priority: high | Milestone: 7.0.2
Component: GHCi | Version: 7.0.1
Keywords: | Testcase:
Blockedby: | Difficulty:
Os: MacOS X | Blocking:
Architecture: x86_64 (amd64) | Failure: Incorrect result at runtime
-------------------------------+--------------------------------------------
Comment(by gwright):
Since this bug only seems to happen on OS X/64 bit, I wonder if it isn't
related to the recent work on the linker. Perhaps the following has a
hint, though I haven't been able to find it yet.
Ran `ghc-7.0.1-rc1` as `inplace/bin/ghc-stage2 --interactive +RTS -Dl`
(built with `GhcDebugged=YES`).
{{{
Prelude> cos (-pi)
resolveObjs: start
initLinker: start
initLinker: idempotent return
resolveObjs: done
lookupSymbol: looking up _base_GHCziFloat_zdfFloatingDouble_closure
initLinker: start
initLinker: idempotent return
lookupSymbol: value of _base_GHCziFloat_zdfFloatingDouble_closure is
0x1073bb298
lookupSymbol: looking up _base_GHCziFloat_pi_closure
initLinker: start
initLinker: idempotent return
lookupSymbol: value of _base_GHCziFloat_pi_closure is 0x1073b9e38
lookupSymbol: looking up _base_GHCziNum_negate_closure
initLinker: start
initLinker: idempotent return
lookupSymbol: value of _base_GHCziNum_negate_closure is 0x1073c6680
lookupSymbol: looking up _base_GHCziReal_zdp1Fractional_closure
initLinker: start
initLinker: idempotent return
lookupSymbol: value of _base_GHCziReal_zdp1Fractional_closure is
0x1073c8b80
lookupSymbol: looking up _base_GHCziFloat_zdfFloatingDouble_closure
initLinker: start
initLinker: idempotent return
lookupSymbol: value of _base_GHCziFloat_zdfFloatingDouble_closure is
0x1073bb298
lookupSymbol: looking up _base_GHCziFloat_zdp1Floating_closure
initLinker: start
initLinker: idempotent return
lookupSymbol: value of _base_GHCziFloat_zdp1Floating_closure is
0x1073b9e30
lookupSymbol: looking up _base_GHCziFloat_zdfFloatingDouble_closure
initLinker: start
initLinker: idempotent return
lookupSymbol: value of _base_GHCziFloat_zdfFloatingDouble_closure is
0x1073bb298
lookupSymbol: looking up _base_GHCziFloat_cos_closure
initLinker: start
initLinker: idempotent return
lookupSymbol: value of _base_GHCziFloat_cos_closure is 0x1073b9e78
lookupSymbol: looking up _ghczmprim_GHCziTypes_ZC_con_info
initLinker: start
initLinker: idempotent return
lookupSymbol: value of _ghczmprim_GHCziTypes_ZC_con_info is 0x10534f9b0
lookupSymbol: looking up _ghczmprim_GHCziTypes_ZMZN_closure
initLinker: start
initLinker: idempotent return
lookupSymbol: value of _ghczmprim_GHCziTypes_ZMZN_closure is 0x105352df0
lookupSymbol: looking up _base_GHCziBase_returnIO_closure
initLinker: start
initLinker: idempotent return
lookupSymbol: value of _base_GHCziBase_returnIO_closure is 0x1073b4cb8
lookupSymbol: looking up _base_GHCziNum_zdp2Num_closure
initLinker: start
initLinker: idempotent return
lookupSymbol: value of _base_GHCziNum_zdp2Num_closure is 0x1073c6660
lookupSymbol: looking up _base_GHCziReal_zdp1Fractional_closure
initLinker: start
initLinker: idempotent return
lookupSymbol: value of _base_GHCziReal_zdp1Fractional_closure is
0x1073c8b80
lookupSymbol: looking up _base_GHCziFloat_zdfFloatingDouble_closure
initLinker: start
initLinker: idempotent return
lookupSymbol: value of _base_GHCziFloat_zdfFloatingDouble_closure is
0x1073bb298
lookupSymbol: looking up _base_GHCziFloat_zdp1Floating_closure
initLinker: start
initLinker: idempotent return
lookupSymbol: value of _base_GHCziFloat_zdp1Floating_closure is
0x1073b9e30
lookupSymbol: looking up _base_SystemziIO_print_closure
initLinker: start
initLinker: idempotent return
lookupSymbol: value of _base_SystemziIO_print_closure is 0x1073e6a20
lookupSymbol: looking up _base_GHCziBase_thenIO_closure
initLinker: start
initLinker: idempotent return
lookupSymbol: value of _base_GHCziBase_thenIO_closure is 0x1073b4ca0
-2.1804254445564623e-216
Prelude>
}}}
If this doesn't tell anyone anything, I will start poking around with
`gdb`.
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/4867#comment:9>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
_______________________________________________
Glasgow-haskell-bugs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs