-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
replace fmt::format with abseil #9623
Comments
@derekargueta I would discuss with @jpeach who was also looking into this. FWIW unless we have a plan to replace it also in logging (it is baked into spdlog pretty heavily) I don't see a huge amount of value in the churn here. If we can replace it everywhere that would be nice. |
Yeah the idea for this was actually from a slack message @jpeach posted a while ago in #envoy-dev. I was able to knock out a lot of easy conversions from |
There's clang tooling to do this here: https://github.com/jpeach/rewrite-fmt-format. There are a very few places (maybe 5) that use fmt formatting specifiers other than "{}". These need to be done by hand. There are also a couple of cases where the format string isn't a literal, which also need to be done by hand. |
This issue has been automatically marked as stale because it has not had activity in the last 30 days. It will be closed in the next 7 days unless it is tagged "help wanted" or other activity occurs. Thank you for your contributions. |
This issue has been automatically closed because it has not had activity in the last 37 days. If this issue is still valid, please ping a maintainer and ask them to label it as "help wanted". Thank you for your contributions. |
Fixes fuzz crashes in fmt::format (https://github.com/fmtlib/fmt/blob/0463665ef136d685fe07a564d93c782456456d3d/include/fmt/format.h#L703) on certain invalid protobuf inputs. fmt is patches with PR (fmtlib/fmt#1650) that replaces the in-house fuzzing resource management to an fmt specific fuzzing macro. Additional Description: The regression test added shows that the proto in question is not unreasonably huge for Envoy. This is causing a high unexplained crash percentage for many fuzz tests on OSS-Fuzz. Also bump fmt. Testing: Added regression test in server fuzz test, failed bazel test test/server:server_fuzz_test --copt=-DFUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION before Related: #9623 Risk level: Low Signed-off-by: Asra Ali <[email protected]>
Given that |
It is a little weird to have two formatting libraries, but probably not worth the churn. Maybe some rule like "use fmt in logging, use absl everywhere else" suffices. If the ultimate goal is to remove dependencies, Abseil is releasing its own logging framework soonish, which could let us cut spdlog and fmt if we wanted. |
Abseil has all the string processing functionality we need, this would allow us to remove a dependency.
The text was updated successfully, but these errors were encountered: