[GHC] #12495: GHC's configure script detects MADV_FREE when it shouldn't

#12495: GHC's configure script detects MADV_FREE when it shouldn't -------------------------------------+------------------------------------- Reporter: orion | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Build System | Version: 8.0.1 Keywords: MADV_FREE | Operating System: Unknown/Multiple Architecture: | Type of failure: Other Unknown/Multiple | Test Case: | Blocked By: Blocking: | Related Tickets: Differential Rev(s): | Wiki Page: -------------------------------------+------------------------------------- In osDecommitMemory there is a [http://git.haskell.org/ghc.git/blob/4986837f8168cacf95c24fecc84d7b36c47f3c11... #define] for MADV_FREE. The presence of MADV_FREE is detected by the [http://git.haskell.org/ghc.git/blob/4986837f8168cacf95c24fecc84d7b36c47f3c11... configure] script, however merely testing for the presence of this symbol does not prove that MADV_FREE is supported by the kernel (which was [https://kernelnewbies.org/Linux_4.5#head- 42578a3e087d5bcc2940954a38ce794fe2cd642c introduced in 4.5]). On newer versions of GCC (e.g. 6.1.1 on Alpine Edge), [https://sourceware.org/git/?p=glibc.git;a=commitdiff;h=981569c74cbb6bafa2ddc... MADV_FREE is included in the compiler's header files], thus leading to a false positive. The impact of this bug is that when GHC is compiled with a more recent version of GCC, "unable to decommit memory: Invalid argument" errors will abound. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/12495 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#12495: GHC's configure script detects MADV_FREE when it shouldn't -------------------------------------+------------------------------------- Reporter: orion | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Build System | Version: 8.0.1 Resolution: | Keywords: MADV_FREE Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: Other | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Changes (by orion): * Attachment "ghc-fix-madv-free.patch" added. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/12495 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#12495: GHC's configure script detects MADV_FREE when it shouldn't -------------------------------------+------------------------------------- Reporter: orion | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Build System | Version: 8.0.1 Resolution: | Keywords: MADV_FREE Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: Other | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by orion): Attached is a patch which fixes the problem for me. It may not be the ideal solution however. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/12495#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#12495: GHC's configure script detects MADV_FREE when it shouldn't -------------------------------------+------------------------------------- Reporter: orion | Owner: Type: bug | Status: patch Priority: normal | Milestone: Component: Build System | Version: 8.0.1 Resolution: | Keywords: MADV_FREE Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: Other | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Changes (by thomie): * status: new => patch -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/12495#comment:2 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#12495: GHC's configure script detects MADV_FREE when it shouldn't -------------------------------------+------------------------------------- Reporter: orion | Owner: Type: bug | Status: patch Priority: normal | Milestone: Component: Build System | Version: 8.0.1 Resolution: | Keywords: MADV_FREE Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: Other | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Changes (by trommler): * cc: trommler (added) -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/12495#comment:3 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#12495: GHC's configure script detects MADV_FREE when it shouldn't -------------------------------------+------------------------------------- Reporter: orion | Owner: Type: bug | Status: closed Priority: normal | Milestone: Component: Build System | Version: 8.0.1 Resolution: duplicate | Keywords: MADV_FREE Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: Other | Test Case: Blocked By: | Blocking: Related Tickets: #12865 | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Changes (by trommler): * status: patch => closed * resolution: => duplicate * related: => #12865 Comment: This is a duplicate of #12865. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/12495#comment:4 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
participants (1)
-
GHC