RFR: 8303524: Check FunctionDescriptor byte order when linking

Maurizio Cimadamore mcimadamore at openjdk.org
Mon Mar 27 15:29:57 UTC 2023


On Mon, 27 Mar 2023 15:09:57 GMT, Jorn Vernee <jvernee at openjdk.org> wrote:

> > The code changes look good, but the javadoc should be updated to reflect the new constraints.
> 
> We currently have this:
> 
> ```
> @throws IllegalArgumentException if the provided function descriptor is not supported by this linker.
> ```
> 
> Which technically seems enough to cover this as well, as byte order is part of the layouts that are part of the function descriptor. I'm not sure if we want to get very detailed here. Different linker implementations might make different decisions, at least theoretically, but this is also the case for the fallback linker which e.g. rejects unions and accepts layouts with any byte order.

I'm noting an asymmetry between this and https://github.com/openjdk/jdk/pull/13164. I think the same arguments apply for/against both.

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

PR Comment: https://git.openjdk.org/jdk/pull/13161#issuecomment-1485336428


More information about the core-libs-dev mailing list