Commit a9743eb7 authored by Ben Gamari's avatar Ben Gamari 🐢 Committed by Marge Bot

testsuite: Add test for #17414

parent 97b6f7a3
Pipeline #12026 passed with stages
in 442 minutes and 15 seconds
{-# LANGUAGE ScopedTypeVariables #-}
import Foreign.Ptr (Ptr)
import Foreign.Marshal.Alloc (mallocBytes, free)
import System.IO (hPutBuf, withBinaryFile, IOMode (WriteMode))
-- more than 2GiB
numBytes :: Int
numBytes = 2264375889
main :: IO ()
main = do
(ptr :: Ptr ()) <- mallocBytes numBytes
-- the next line produces the exception on macOS
withBinaryFile "test.out" WriteMode (\h -> hPutBuf h ptr numBytes)
free ptr
-- Truncate file in case it doesn't get deleted
writeFile "test.out" ""
......@@ -132,3 +132,5 @@ test('encodingerror001', normal, compile_and_run, [''])
test('T4808', [fragile_for(16909, ['threaded2']), exit_code(1)], compile_and_run, [''])
test('T4895', normal, compile_and_run, [''])
test('T7853', normal, compile_and_run, [''])
# Tests ability to perform >32-bit IO operations
test('T17414', [when(wordsize(32), skip), high_memory_usage], compile_and_run, [''])
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment