[GHC] #12572: `readdir_r` is deprecated

GHC ghc-devs at haskell.org
Thu Sep 8 00:31:24 UTC 2016


#12572: `readdir_r` is deprecated
-------------------------------------+-------------------------------------
        Reporter:  erikd             |                Owner:  erikd
            Type:  bug               |               Status:  new
        Priority:  normal            |            Milestone:
       Component:  Core Libraries    |              Version:  8.1
      Resolution:                    |             Keywords:
Operating System:  Unknown/Multiple  |         Architecture:
 Type of failure:  Building GHC      |  Unknown/Multiple
  failed                             |            Test Case:
      Blocked By:                    |             Blocking:
 Related Tickets:                    |  Differential Rev(s):
       Wiki Page:                    |
-------------------------------------+-------------------------------------

Comment (by ezyang):

 Bug looks very simple:

 {{{
 commit 748e3224e06638639a76cbc622e9b8c17054d5df
 Author: Edward Z. Yang <ezyang at cs.stanford.edu>
 Date:   Wed Sep 7 17:31:02 2016 -0700

     Fix segfault from inconsistent macro use.

     Signed-off-by: Edward Z. Yang <ezyang at cs.stanford.edu>

 diff --git a/cbits/HsUnix.c b/cbits/HsUnix.c
 index 08cccd5..7c72a34 100644
 --- a/cbits/HsUnix.c
 +++ b/cbits/HsUnix.c
 @@ -110,7 +110,7 @@ char *__hscore_d_name( struct dirent* d )

  void __hscore_free_dirent(struct dirent *dEnt)
  {
 -#if HAVE_READDIR_R
 +#if HAVE_READDIR_R && USE_READDIR_R
    free(dEnt);
  #endif
  }
 }}}

--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/12572#comment:7>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler


More information about the ghc-tickets mailing list