Withdrawn: 8329968: os::random should be random
duke
duke at openjdk.org
Wed Jul 24 03:43:41 UTC 2024
On Tue, 9 Apr 2024 16:55:07 GMT, Thomas Stuefe <stuefe at openjdk.org> wrote:
> Hi,
>
> This change ensures that the random seed of os::random is initialized randomly. Before this patch, every sequence of os::random calls gave the same results. With this patch, a quasi-random seed based on javaTimeNanos is used.
>
> Where this matters the most:
>
> - Random distribution of ihashes. Atm, ihashes are always the same for the same sequence of System.identityHashCode.
>
> - We use os::random to fuzzing gtests. This is the part most important to me. I want gtest tests that use os::random for stress testing data structures to be as efficient as possible in tickling out pathological behavior.
>
> Note that this issue turned out to be much more controversial than I expected. Please see pro- and con-arguments in JBS comment section. I would like a consensus on this issue before pushing the fix (pinging @dholmes). If we cannot agree that this needs fixing, I'd be content with at least the gtests being random. So, a smaller version of this change would be to use a separate random seed for gtests.
>
> ---
>
> Tests:
> - tested that the regression test fails with Stock JVM, passes with patched JVM
> - GHAs
> (will do more tests to see if the new randomness shakes lose bugs. However, before investing the work I'd like consensus that this PR can go forward)
This pull request has been closed without being integrated.
-------------
PR: https://git.openjdk.org/jdk/pull/18702
More information about the hotspot-runtime-dev
mailing list