Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Functions that write to files leave old content at end of file #421

@j6carey

Description

@j6carey

In module LLVM.Module, the functions writeObjectToFile, writeLLVMAssemblyToFile, writeTargetAssemblyToFile (and possibly others) write to the named file, but if the file already exists and was longer than the number of bytes newly written, then the old data remain at the end of the file, creating a mix of old and new content.

This behavior seems surprising to me. If it is a feature, then I think it needs to be called out in the Haddock documentation. If it is a bug, then it should be easy to fix.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions