Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update fmtlib #6149

Closed
breezewish opened this issue Oct 16, 2022 · 0 comments · Fixed by #6151
Closed

Update fmtlib #6149

breezewish opened this issue Oct 16, 2022 · 0 comments · Fixed by #6151
Labels
good first issue Denotes an issue ready for a new contributor, according to the "help wanted" guidelines. help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. type/enhancement The issue or PR belongs to an enhancement.

Comments

@breezewish
Copy link
Member

breezewish commented Oct 16, 2022

Enhancement

The current version (8.0.1) of fmtlib contains bug when FMT_COMPILE is used:

#include <fmt/compile.h>
#include <atomic>

using UInt64 = uint64_t;

int main() {
    std::atomic<UInt64> sequence{8};
    fmt::print(FMT_COMPILE("sequence={}\n"), sequence);
}

This incorrectly printed out as sequence=\x08 instead of sequence=8.

FMT_COMPILE is introduced to all logs in #6080, so that this bug influenced our log output, for example:

[2022/10/16 16:47:58.639 +08:00] [INFO] [PageDirectoryFactory.cpp:50] ["PageDirectory restored [max_page_id=0] [max_applied_ver=\u0000]"] [source="PageDirectoryFactory __global__.log"] [thread_id=1]

Maybe related with fmtlib/fmt#2565

8.1.0 works fine (godbolt)

@breezewish breezewish added type/enhancement The issue or PR belongs to an enhancement. help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. good first issue Denotes an issue ready for a new contributor, according to the "help wanted" guidelines. labels Oct 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Denotes an issue ready for a new contributor, according to the "help wanted" guidelines. help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. type/enhancement The issue or PR belongs to an enhancement.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant