[foreign-memaccess+abi] RFR: 8294970: Add linker option for saving thread-locals that the VM can overwrite

Maurizio Cimadamore mcimadamore at openjdk.org
Tue Oct 25 20:41:40 UTC 2022


On Tue, 25 Oct 2022 19:18:13 GMT, Jorn Vernee <jvernee at openjdk.org> wrote:

>> I don't really like that idea, because it requires the descriptor to be specified twice, which opens up the possibility of them going out of sync.
>
> I think we should have 2 validation steps, one when creating the option, where we can check if the option itself is valid, and then another when linking, where we check whether the option makes sense for a particular linkage request.

I understand that the steps are logically two, and are implemented separately. But if all the code we have is doing:


        LinkerOptions optionSet = LinkerOptions.of(options);
        optionSet.validateForDowncall(function);


Then, by exposing them as separate steps, we don't gain much, but it might be the case that, at some point later, another client forgets about calling the validation step.

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

PR: https://git.openjdk.org/panama-foreign/pull/742


More information about the panama-dev mailing list