boostorg / locale

Boost.Locale
Boost Software License 1.0
31 stars 70 forks source link

Catch OSX sonoma iconv issue #218

Closed Flamefire closed 6 months ago

Flamefire commented 7 months ago

E2BIG shall be returned if the output buffer is too small. We pass a 64 byte buffer which should be enough to do something

However it is observed on MacOS Sonoma that iconv returns E2BIG without doing any progress leading to an infinite loop as the same inputs will be passed over and over. Instead raise an exception when this case is detected.

Closes #206

codecov[bot] commented 6 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Comparison is base (7da8ce3) 95.72% compared to head (5f2a828) 95.72%.

Additional details and impacted files [![Impacted file tree graph](https://app.codecov.io/gh/boostorg/locale/pull/218/graphs/tree.svg?width=650&height=150&src=pr&token=vF6mWvgGUn&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=boostorg)](https://app.codecov.io/gh/boostorg/locale/pull/218?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=boostorg) ```diff @@ Coverage Diff @@ ## develop #218 +/- ## ======================================== Coverage 95.72% 95.72% ======================================== Files 116 116 Lines 9930 9937 +7 ======================================== + Hits 9505 9512 +7 Misses 425 425 ``` | [Files](https://app.codecov.io/gh/boostorg/locale/pull/218?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=boostorg) | Coverage Δ | | |---|---|---| | [src/boost/locale/encoding/iconv\_converter.hpp](https://app.codecov.io/gh/boostorg/locale/pull/218?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=boostorg#diff-c3JjL2Jvb3N0L2xvY2FsZS9lbmNvZGluZy9pY29udl9jb252ZXJ0ZXIuaHBw) | `94.64% <100.00%> (ø)` | | | [test/test\_encoding.cpp](https://app.codecov.io/gh/boostorg/locale/pull/218?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=boostorg#diff-dGVzdC90ZXN0X2VuY29kaW5nLmNwcA==) | `100.00% <100.00%> (ø)` | | ------ [Continue to review full report in Codecov by Sentry](https://app.codecov.io/gh/boostorg/locale/pull/218?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=boostorg). > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=boostorg) > `Δ = absolute (impact)`, `ø = not affected`, `? = missing data` > Powered by [Codecov](https://app.codecov.io/gh/boostorg/locale/pull/218?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=boostorg). Last update [7da8ce3...5f2a828](https://app.codecov.io/gh/boostorg/locale/pull/218?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=boostorg). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=boostorg).