Skip to content

Invalid data written to stream when runway is used #28

@arnetheduck

Description

@arnetheduck

In the category of strange errors, status-im/nim-snappy#11 shows how random data gets written to a stream for some nim versions when optimizations are turned on.

This smells of reliance on some undefined behavior that make some compilers / compiler options emit unexpected code.

The bug goes away if ensureRunway is not called.

Cannot repro locally on fedora / gcc 11.2.1.

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