Skip to content

[fix] Digest::Base: synchronize MessageDigest mutation#9344

Merged
headius merged 1 commit intojruby:jruby-10.0from
kares:digest-sync-10
Mar 31, 2026
Merged

[fix] Digest::Base: synchronize MessageDigest mutation#9344
headius merged 1 commit intojruby:jruby-10.0from
kares:digest-sync-10

Conversation

@kares
Copy link
Copy Markdown
Member

@kares kares commented Mar 29, 2026

java.security.MessageDigest is not thread-safe, concurrent calls to update/finish/reset on a shared Digest object from multiple Ruby threads would corrupt the internal state, producing wrong digests or ArrayIndexOutOfBoundsException (reproduces with included test)

`java.security.MessageDigest` is not thread-safe, concurrent calls to
update/finish/reset on a shared Digest object from multiple Ruby threads
would corrupt the internal state, producing wrong digests or
`ArrayIndexOutOfBoundsException`
@kares kares added this to the JRuby 10.0.5.0 milestone Mar 29, 2026
@headius headius merged commit 6454847 into jruby:jruby-10.0 Mar 31, 2026
107 checks passed
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.

2 participants