[foreign-preview] RFR: 8281228: Preview branch's CLinker.downcallHandle crashes inside asm [v2]

Jorn Vernee jvernee at openjdk.java.net
Fri Feb 4 12:52:02 UTC 2022


On Fri, 4 Feb 2022 12:47:47 GMT, Maurizio Cimadamore <mcimadamore at openjdk.org> wrote:

>> This patch addresses a low level crash occuring in the ASM library, triggered by the new binding specialization logic. After some debugging I realized that there was no real "bug", but something subtle that we missed during review. The binding specializer uses an internal operand stack to keep track of the types maniupulated when processing ABI bindings. Most of the "pop" operation on this stack were done inside an `assert` statement, which meant that the pop operation would not be executed when running without `-esa`. Unfortunately this issue was not caught because the makefile always runs tests with assertions enabled.
>> 
>> After fixing this, I have also verified that the existing test (if ran without assertion enabled) would indeed have been enough to trigger the failure; in other words, the failure has not been detected because of *the way* in which tests were ran, and not because we were lacking in test coverage (for instance, TestDowncall showed 812 failures without the fix). For these reasons I did not include any test in the fix.
>
> Maurizio Cimadamore has updated the pull request incrementally with one additional commit since the last revision:
> 
>   Fix adaptation in non-specialized path, and fix TestMatrix

Marked as reviewed by jvernee (Committer).

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

PR: https://git.openjdk.java.net/panama-foreign/pull/638


More information about the panama-dev mailing list