RFR: 8305201: Improve error message for GroupLayouts that are too large on SysV [v2]

Andrey Turbanov aturbanov at openjdk.org
Thu Apr 27 12:15:23 UTC 2023


On Thu, 27 Apr 2023 09:28:23 GMT, Jorn Vernee <jvernee at openjdk.org> wrote:

>> Using for instance a struct layout that contains an unbounded array will produce the exception from the JBS issue.
>> 
>> This patch checks for the case where a GroupLayout is too large more explicitly, and reports the issue using a more informative exception.
>
> Jorn Vernee has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains 42 commits:
> 
>  - Add test. Use toIntExact
>  - improve error message for too large structs
>  - Merge pull request #3 from JornVernee/IsForeignLinkerSupported
>    
>    rename has_port
>  - rename has_port
>  - Merge pull request #2 from JornVernee/WSL_BB
>    
>    account for missing functional in WSL in TestByteBuffer
>  - account for missing mincore on WSL in TestByteBuffer
>  - Merge branch 'master' into PR_21_V2
>  - 8305369: Issues in zero-length memory segment javadoc section
>  - 8305087: MemoryLayout API checks should be more eager
>  - Merge master
>  - ... and 32 more: https://git.openjdk.org/jdk/compare/d8af7a60...8b1dbd31

test/jdk/java/foreign/TestByteBuffer.java line 335:

> 333:                     assertEquals(byteBuffer.isReadOnly(), segment.isReadOnly());
> 334:                     assertTrue(byteBuffer.isDirect());
> 335:                 } catch(IOException e) {

nit
Suggestion:

                } catch (IOException e) {

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

PR Review Comment: https://git.openjdk.org/jdk/pull/13581#discussion_r1179051702


More information about the core-libs-dev mailing list