On Mon, 8 Jul 2024 13:09:50 GMT, Adam Sotona <asot...@openjdk.org> wrote:

> Class-File API constant pool implementation requires non-zero entry hash code.
> Unfortunately current implementation computes zero hash code for specific CP 
> entries.
> 
> This patch removes invalid and obsolete `AbstractPoolEntry::phiMix` 
> calculation and assures all pool entries have non-zero hash. A regression 
> test of the actual zero-hash `IntegerEntry` has been added. 
> 
> All pre-computed hash codes in `BoundAttribute::standardAttribute` are 
> updated.
> 
> The patch has no performance effect measurable by any of the actual 
> Class-File API benchmarks.
> 
> Please review.
> 
> Thanks,
> Adam

This pull request has now been integrated.

Changeset: 3f2636d9
Author:    Adam Sotona <asot...@openjdk.org>
URL:       
https://git.openjdk.org/jdk/commit/3f2636d9b71f5270c83d17dcf5d18cf907978475
Stats:     57 lines in 4 files changed: 7 ins; 7 del; 43 mod

8335820: java/lang/invoke/LFCaching/LFSingleThreadCachingTest.java fails due to 
IllegalArgumentException: hash must be nonzero

Reviewed-by: liach

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

PR: https://git.openjdk.org/jdk/pull/20074

Reply via email to