[jdk21u-dev] RFR: 8329754: The ThreadSafe attribute is ignored for SecureRandom algorithm aliases

Goetz Lindenmaier goetz at openjdk.org
Fri Apr 4 07:39:58 UTC 2025


On Thu, 3 Apr 2025 23:06:27 GMT, Satyen Subramaniam <ssubramaniam at openjdk.org> wrote:

> Backporting JDK-8329754: The ThreadSafe attribute is ignored for SecureRandom algorithm aliases. Fixes a bug that occurs when a provider registers an alias for the `SecureRandom` algorithm with "ThreadSafe=true" and where the `SecureRandom` instances using the alias do not honor the `ThreadSafe` attribute.

Hi @satyenme 
Do I understand correctly that without this fix the code was executed synchronized even if run with ThreadSafe=true, but after the fix it can actually be executed in parallel?
If so, I don't buy the risk is low here.  Running in parallel after an JVM update might easily expose errors in the thread safeness of the secure random providers not seen before. Given this is basically a performance optimization and a long-standing issue I''m not sure we need this backport.

-------------

PR Comment: https://git.openjdk.org/jdk21u-dev/pull/1587#issuecomment-2777824375


More information about the jdk-updates-dev mailing list