[foreign-jextract] RFR: 8249301: jextract fails with CCE when encountering a typedefdecl whose type is FunctionProto

Henry Jen henryjen at openjdk.java.net
Tue Jul 14 19:07:27 UTC 2020


On Tue, 14 Jul 2020 17:52:38 GMT, Jorn Vernee <jvernee at openjdk.org> wrote:

> Hi,
> 
> This patch resolves a CCE observed when parsing a typdef that contains a function-prototype-like function type with an
> explicit calling convention specifier. For instance:
> typedef void __stdcall foo();
> 
> Thanks,
> Jorn

The fix looks fine, but I suspect there are similar issue for other types.

The current code seems to me assumes that if a cursor is a typedef cursor, the type will be delegated type as it's a
typedef. But that's probably not the case, if the typedef cursor type is the target type, it can be another
typedef(Type.Delegated) or function(as in the fix) or perhaps Declared?

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

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


More information about the panama-dev mailing list