On Tue, 17 Sep 2024 14:12:58 GMT, Per Minborg <pminb...@openjdk.org> wrote:
> This PR prevents sequence layout with padding to be used with the Linker. The javadoc of the `Linker` also states that: > [A group layout] G does not contain padding other than what is strictly > required to align its non-padding layout elements, or to satisfy (2) [the size of {@code G} is a multiple of its alignment constraint] I believe it is the intent here to rule out empty groups, or groups that contain only padding. Should we address that here (as I believe that once we add more checks, we'll need more tweaks to make the various exception more uniform) ? Btw, if my interpretation of the javadoc is correct, I believe we should strengthen the javadoc a bit, by saying explicitly that a group layout w/o non-padding elements is not-supported. With the current text, if there's no non-padding element, then it is not clear how should the other rules be applied. ------------- PR Comment: https://git.openjdk.org/jdk/pull/21041#issuecomment-2363186763