Integrated: 8294460: CodeSection::alignment checks for CodeBuffer::SECT_STUBS incorrectly

Boris Ulasevich bulasevich at openjdk.org
Fri Oct 21 09:00:03 UTC 2022


On Thu, 13 Oct 2022 13:50:55 GMT, Boris Ulasevich <bulasevich at openjdk.org> wrote:

> This is a fix for an apparent code bug:
> 
> 
> inline int CodeSection::alignment(int section) {
>   if (section == CodeBuffer::SECT_CONSTS) {
>     return (int) sizeof(jdouble);
>   }
>   if (section == CodeBuffer::SECT_INSTS) {
>     return (int) CodeEntryAlignment;
>   }
>   if (CodeBuffer::SECT_STUBS) {   <--- here must be (section == CodeBuffer::SECT_STUBS) condition!
>     // CodeBuffer installer expects sections to be HeapWordSize aligned
>     return HeapWordSize;
>   }
>   ShouldNotReachHere();
>   return 0;
> }
> 
> 
> Also, the section size initializer code is moved to initialize_misc() to fix the code path that works with uninitialized data.

This pull request has now been integrated.

Changeset: 50647187
Author:    Boris Ulasevich <bulasevich at openjdk.org>
URL:       https://git.openjdk.org/jdk/commit/50647187e8b0314ad67b0767f71c56fd50e8feaf
Stats:     8 lines in 1 file changed: 4 ins; 3 del; 1 mod

8294460: CodeSection::alignment checks for CodeBuffer::SECT_STUBS incorrectly

Reviewed-by: phh, kvn

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

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


More information about the hotspot-compiler-dev mailing list