RFR: 8340205: Native linker allows MemoryLayout consisting of only PaddingLayout [v6]

Maurizio Cimadamore mcimadamore at openjdk.org
Wed Oct 30 10:55:07 UTC 2024


On Tue, 29 Oct 2024 10:43:58 GMT, Vladimir Kozelkov <duke at openjdk.org> wrote:

> > Should we disallow sequence layouts with an element count of zero?
> 
> I think this should be done in specific implementations (if at all), not in AbstractLinker, where general rules of "what is definitely wrong" apply. At least that is the conclusion we came to in the discussion above.

I agree with the reply. A struct with a field that is a sequence layout whose element count is zero is not in the _obviously wrong_ category - but might be in the "this platform doesn't like it" category. So, we should be agnostic about it at the javadoc level.

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

PR Comment: https://git.openjdk.org/jdk/pull/21041#issuecomment-2446551717


More information about the core-libs-dev mailing list