Skip to content

ICU-21591 Release lock in SimpleDateFormat::tzFormat in case of failure#107

Closed
akoeplinger wants to merge 1 commit intodotnet:maint/maint-67from
akoeplinger:backport-icu-fix
Closed

ICU-21591 Release lock in SimpleDateFormat::tzFormat in case of failure#107
akoeplinger wants to merge 1 commit intodotnet:maint/maint-67from
akoeplinger:backport-icu-fix

Conversation

@akoeplinger
Copy link
Member

Backport of unicode-org/icu#1701 which is a slightly modified fix for #103

/cc @filipnavara

Also remove the use of the unsafe double-checked lock idiom in the same
function, SimpleDateFormat::tzFormat(). Synchronization now always uses a
mutex, which is slower, but in the context of format or parse operations,
shouldn't be significant.

Added synchronization to one more unsafe direct reference to a const
SimpleDateFormat::fTimeZoneFormat. In the assignment operator.
@akoeplinger
Copy link
Member Author

Hmm looks like this would require backporting more changes to the maint-67 branch since it's missing e.g. unicode-org/icu@afa9b9b

I don't think it's worth it since we have plans to bump to icu 68 anyway, @filipnavara what do you think?

@filipnavara
Copy link
Member

I don't think it's worth it to be honest. The call will either always fail or always succeed in the way it's used in .NET so the additional memory protections are not gonna make much difference.

@akoeplinger akoeplinger deleted the backport-icu-fix branch April 28, 2021 12:05
directhex pushed a commit that referenced this pull request May 13, 2022
Bumps ant from 1.10.9 to 1.10.11.

---
updated-dependencies:
- dependency-name: org.apache.ant:ant
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants