rts: Always truncate output files

Authored by bgamari on Jul 26 2019, 9:32 AM.

Description

rts: Always truncate output files

Previously there were numerous places in the RTS where we would fopen
with the "w" flag string. This is wrong as it will not truncate the
file. Consequently if we write less data than the previous length of the
file we will leave garbage at its end.

Fixes Trac #16993.

Details

Committed
Marge Bot <ben+marge-bot@smart-cactus.org>Aug 2 2019, 9:20 PM
Parents
rGHC0ecacb1ee6d3: Add Note [withTiming] in compiler/main/ErrUtils.hs
Branches
Unknown
Tags
Unknown
Marge Bot <ben+marge-bot@smart-cactus.org> committed rGHC4664bafcb8db: rts: Always truncate output files (authored by bgamari).Aug 2 2019, 9:20 PM