RFR: 8303002: Reject packed structs from linker [v6]
Maurizio Cimadamore
mcimadamore at openjdk.org
Thu Apr 20 09:30:52 UTC 2023
On Thu, 20 Apr 2023 01:12:44 GMT, Jorn Vernee <jvernee at openjdk.org> wrote:
>> This patch adds checks in AbstractLinker to reject packed structs and structs with excess padding (e.g. unnamed bitfields), since both of those are currently not supported, and the ABI/spec seems too vague to base support on.
>
> Jorn Vernee has updated the pull request incrementally with four additional commits since the last revision:
>
> - restrictions -> characteristics
> - polish pt. 2
> - polish wording
> - review comments
Looks good.
One (optional, for future?) thing that came to mind, is that if we wanted to speed up the check we could compute whether a layout is canonical or not on construction (since for structs we already have to go through all the elements and check alignment).
-------------
Marked as reviewed by mcimadamore (Reviewer).
PR Review: https://git.openjdk.org/jdk/pull/13164#pullrequestreview-1393584926
More information about the core-libs-dev
mailing list