Skip to content

Big-endian serialization broken #718

@adamlerer

Description

@adamlerer

Inspection of the code shows this is broken.

https://github.com/pytorch/pytorch/blob/master/torch/csrc/generic/serialization.cpp#L64
s/data/le_buffer.get()/

I think the corresponding code in readFileRaw is broken too. The data is read into le_buffer but then never copied into data.

It seems dangerous to support big-endian if you're not planning to test it. Maybe just rip this out and throw an exception?

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