Skip to content

We incorrectly assume FIO functions return pointer #248

Description

@reticulatedpines

As noted in fio-ml.h: the DryOS functions in FIO family don't use FILE *. We made a mistake a long time ago and now it's painful to correct. Where FILE * is used, it's a handle. But we treat it as an opaque pointer. This can lead to problems where 0 is involved. That's a valid handle,
but an invalid pointer (and we often assume NULL == 0, which is another issue...).

On some D8 cams, this seems to be a real problem, looks like maybe we're trying to create a file before the OS does, so we get 0 back for the first handle, and treat it as an error due to NULL pointer. Seen by kitor in auto backup rom investigations.

Placeholder ticket, so we don't forget this is a real issue. Needs more investigation.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions