Marge Bot pushed to branch master at Glasgow Haskell Compiler / GHC

Commits:

4 changed files:

Changes:

  • compiler/GHC/SysTools/Ar.hs
    ... ... @@ -168,7 +168,7 @@ putArchEntry (ArchiveEntry name time own grp mode st_size file) = do
    168 168
       putPaddedInt          6 own
    
    169 169
       putPaddedInt          6 grp
    
    170 170
       putPaddedInt          8 mode
    
    171
    -  putPaddedInt         10 (st_size + pad)
    
    171
    +  putPaddedInt         10 st_size
    
    172 172
       putByteString           "\x60\x0a"
    
    173 173
       putByteString           file
    
    174 174
       when (pad == 1) $
    

  • testsuite/tests/ghc-api/T26120.hs
    1
    +{-# LANGUAGE OverloadedStrings #-}
    
    2
    +
    
    3
    +module Main
    
    4
    +  ( main,
    
    5
    +  )
    
    6
    +where
    
    7
    +
    
    8
    +import Data.Foldable
    
    9
    +import GHC.SysTools.Ar
    
    10
    +
    
    11
    +main :: IO ()
    
    12
    +main = for_ [writeBSDAr, writeGNUAr] $ \writer -> do
    
    13
    +  writer "test.a" $
    
    14
    +    Archive
    
    15
    +      [ ArchiveEntry
    
    16
    +          { filename = "1",
    
    17
    +            filetime = 0,
    
    18
    +            fileown = 0,
    
    19
    +            filegrp = 0,
    
    20
    +            filemode = 644,
    
    21
    +            filesize = 1,
    
    22
    +            filedata = "\NUL"
    
    23
    +          }
    
    24
    +      ]
    
    25
    +  print =<< loadAr "test.a"

  • testsuite/tests/ghc-api/T26120.stdout
    1
    +Archive [ArchiveEntry {filename = "1", filetime = 0, fileown = 0, filegrp = 0, filemode = 644, filesize = 1, filedata = "\NUL"}]
    
    2
    +Archive [ArchiveEntry {filename = "1", filetime = 0, fileown = 0, filegrp = 0, filemode = 644, filesize = 1, filedata = "\NUL"}]

  • testsuite/tests/ghc-api/all.T
    ... ... @@ -70,3 +70,5 @@ test('T25577', [ extra_run_opts(f'"{config.libdir}"')
    70 70
                    # support
    
    71 71
                    , when(arch('wasm32') or arch('javascript'), skip)
    
    72 72
                    ], compile_and_run, ['-package ghc'])
    
    73
    +
    
    74
    +test('T26120', [], compile_and_run, ['-package ghc'])