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
compound_view::explode() uses bad format string #14577
Milestone
Comments
tchaikov
added a commit
to tchaikov/scylladb
that referenced
this issue
Jul 8, 2023
before this change, we format a sstring with "{:d}", fmtlib would throw `fmt::format_error` at runtime when formatting it. this is not expected. so, in this change, we just print the int8_t using `seastar::format()` in a single pass. and with the format specifier of `#02x` instead of adding the "0x" prefix manually. Fixes scylladb#14577 Signed-off-by: Kefu Chai <kefu.chai@scylladb.com>
tchaikov
changed the title
compound_view::explode() use bad format string
compound_view::explode() uses bad format string
Jul 8, 2023
denesb
pushed a commit
that referenced
this issue
Dec 18, 2023
before this change, we format a sstring with "{:d}", fmtlib would throw `fmt::format_error` at runtime when formatting it. this is not expected. so, in this change, we just print the int8_t using `seastar::format()` in a single pass. and with the format specifier of `#02x` instead of adding the "0x" prefix manually. Fixes #14577 Signed-off-by: Kefu Chai <kefu.chai@scylladb.com> Closes #14578 (cherry picked from commit 27d6ff3)
This is a minor fix for an error-path, but the risk is very low too. Backported to 5.2. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
format a
sstring
with{:d}
will annoy fmtlib, and it will throw an exception in this case.The text was updated successfully, but these errors were encountered: