tests: Add std::to_string to list of locale dependent functions#17851
Conversation
|
ACK |
|
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers. ConflictsReviewers, this pull request conflicts with the following ones:
If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first. |
| "src/qt/rpcconsole.cpp:.*atoi" | ||
| "src/rest.cpp:.*strtol" | ||
| "src/rpc/net.cpp.*std::to_string" | ||
| "src/rpc/rawtransaction.cpp.*std::to_string" |
There was a problem hiding this comment.
This shouldn't be an exception, it's a bug?
There was a problem hiding this comment.
I'm not sure I follow: how is this a bug?
Do you mean the inclusion of src/rpc/rawtransaction.cpp in this list, or do you mean the usage of std::to_string in src/rpc/rawtransaction.cpp?
Please clarify :)
Applies also to the cases below.
There was a problem hiding this comment.
I believe @luke-jr means that the current usage of that function in rpc/rawtransaction.cpp is a bug, and thus should not be silenced, but fixed.
There was a problem hiding this comment.
Opened an issue in #17866 so we don't lose track of this.
There was a problem hiding this comment.
@sipa Ah, got it. FWIW I consider all entries in KNOWN_VIOLATIONS to be potential bugs :)
| "src/rest.cpp:.*strtol" | ||
| "src/rpc/net.cpp.*std::to_string" | ||
| "src/rpc/rawtransaction.cpp.*std::to_string" | ||
| "src/rpc/util.cpp.*std::to_string" |
There was a problem hiding this comment.
I think this one is a bug too - we don't want RPC help locale-dependent, do we?
| "src/rpc/net.cpp.*std::to_string" | ||
| "src/rpc/rawtransaction.cpp.*std::to_string" | ||
| "src/rpc/util.cpp.*std::to_string" | ||
| "src/test/addrman_tests.cpp.*std::to_string" |
| "src/test/addrman_tests.cpp.*std::to_string" | ||
| "src/test/blockchain_tests.cpp.*std::to_string" | ||
| "src/test/dbwrapper_tests.cpp:.*snprintf" | ||
| "src/test/denialofservice_tests.cpp.*std::to_string" |
There was a problem hiding this comment.
Bug? Or maybe we should be accepting locale numbers in args...
| "src/test/denialofservice_tests.cpp.*std::to_string" | ||
| "src/test/fuzz/parse_numbers.cpp:.*atoi" | ||
| "src/test/key_tests.cpp.*std::to_string" | ||
| "src/test/net_tests.cpp.*std::to_string" |
|
Going to push this doc/test-only change. Bug fixes can be solved in a separate pull request. |
…unctions 1f0adb3 tests: Add std::to_string to list of locale dependent functions (practicalswift) Pull request description: Add `std::to_string` to list of locale dependent functions: > `std::to_string` relies on the current locale for formatting purposes […] Context #17808 (comment) ACKs for top commit: hebasto: ACK 1f0adb3, I have reviewed the code and it looks OK, I agree it can be merged. Tree-SHA512: 4cd6f567f5931dd166cdb9b065a939fb0bc02c93de18a9501655d98caf18b7c4d81f1881ea900dcdf2ec103d3ab1bdc9c68d3257b76dd2468a59e74d278b0d8d
…ndent functions 1f0adb3 tests: Add std::to_string to list of locale dependent functions (practicalswift) Pull request description: Add `std::to_string` to list of locale dependent functions: > `std::to_string` relies on the current locale for formatting purposes […] Context bitcoin#17808 (comment) ACKs for top commit: hebasto: ACK 1f0adb3, I have reviewed the code and it looks OK, I agree it can be merged. Tree-SHA512: 4cd6f567f5931dd166cdb9b065a939fb0bc02c93de18a9501655d98caf18b7c4d81f1881ea900dcdf2ec103d3ab1bdc9c68d3257b76dd2468a59e74d278b0d8d
…ndent functions 1f0adb3 tests: Add std::to_string to list of locale dependent functions (practicalswift) Pull request description: Add `std::to_string` to list of locale dependent functions: > `std::to_string` relies on the current locale for formatting purposes […] Context bitcoin#17808 (comment) ACKs for top commit: hebasto: ACK 1f0adb3, I have reviewed the code and it looks OK, I agree it can be merged. Tree-SHA512: 4cd6f567f5931dd166cdb9b065a939fb0bc02c93de18a9501655d98caf18b7c4d81f1881ea900dcdf2ec103d3ab1bdc9c68d3257b76dd2468a59e74d278b0d8d
Summary: > `std::to_string` relies on the current locale for formatting purposes This is a backport of Core [[bitcoin/bitcoin#18134 | PR18134]] and [[bitcoin/bitcoin#17851 | PR17851]] Test Plan: `ninja all check-all` Reviewers: #bitcoin_abc, Fabien, majcosta Reviewed By: #bitcoin_abc, Fabien, majcosta Subscribers: majcosta, Fabien Differential Revision: https://reviews.bitcoinabc.org/D8878
Add
std::to_stringto list of locale dependent functions:Context #17808 (comment)