Skip to content

Ability to force use of fallback_file #3992

Description

@Wraiyth

We have an issue where we are getting a crash in template <typename U> void append(const U* begin, const U* end) L919 memcpy(ptr_ + size_, begin, count * sizeof(T)); due to ptr_ being uninitialized. We have tracked this down to the underlying file buffer not being correctly initialized on this platform (a game console).

This particular platform does not have the flockfile, funlockfile, getc_unlocked and putc_unlocked posix methods. We've stubbed these out and forwarded them onto the platform methods, but still experiencing the same issue.

Ideally we would like to just force fmt to use fallback_file on this platform instead of apple_file (which is what is being detected and used).
Is there a way for us to do this in the library as it stands? We have added a FMT_FORCE_FALLBACK define around the templating of get_file to just force it in our own fork at this stage.

For context, this issue was not present in 9.x when we were using it, and seems related to the buffering changes introduced in 6b68dff this commit.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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