[foreign-memaccess+abi] RFR: 8268230: Foreign Linker API & Windows user32/kernel32: String conversion seems broken

Jorn Vernee jvernee at openjdk.java.net
Fri Jun 11 19:53:57 UTC 2021


On Fri, 11 Jun 2021 16:43:35 GMT, Duncan Gittins <duncan.gittins at gmail.com> wrote:

> I don't think reverse conversion works using Clinker.toJavaString.

Good catch, the `toJavaString` version also looks broken, since it looks for the first 0 byte, but that might just be the high-order byte of a character, which just happens to be 0, for wider char sets (for some reason I had assumed this was okay when thinking about it before).

Though we use Charset to do the encoding, it's probably not a bad idea to test a couple different strings as well.

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

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


More information about the panama-dev mailing list