Re: [GHC] #7655: 7.6.2 Segmentation Fault/Bus Error in large exponentation

#7655: 7.6.2 Segmentation Fault/Bus Error in large exponentation -------------------------------------+---------------------------------- Reporter: Doug310 | Owner: Type: bug | Status: infoneeded Priority: normal | Milestone: 7.8.4 Component: GHCi | Version: 7.8.1-rc1 Resolution: | Keywords: exponentiation Operating System: MacOS X | Architecture: x86_64 (amd64) Type of failure: GHCi crash | Difficulty: Unknown Test Case: | Blocked By: Blocking: | Related Tickets: Differential Revisions: | -------------------------------------+---------------------------------- Comment (by rwbarton): Actually a few things were not quite right in that. `--enable- alloca=reentrant` is not the same as `WANT_TMP_REENTRANT`! It means "use `WANT_TMP_ALLOCA` if you have `alloca`, otherwise use `WANT_TMP_REENTRANT`". So that explains how `WANT_TMP_ALLOCA` is getting set. Also, my examination of the Debian `libgmp.so.10` was overly hasty. It is actually built with `WANT_TMP_ALLOCA`. There are several allocation paths in `mpn_mul`, and some call `malloc` when the amount to be allocated exceeds a certain threshold, while others unconditionally allocate on the stack. Not sure what the best thing to do here is aside from resorting to `WANT_TMP_REENTRANT`, which I fear may carry a noticeable performance penalty. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/7655#comment:32 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
participants (1)
-
GHC