-
Type:
Bug
-
Resolution: Fixed
-
Priority:
P3
-
None
-
Affects Version/s: repo-panama
-
Component/s: tools
In extracted code, there are two cases where segments can be created outside of an allocation scope:
* structs passed returned by value
* callback segments
In these cases it is necessary for clients to manually handle the life-cycle of these segments with a separate (nested) try with resource, which makes the code harder to follow.
Jextract is currently bypassing this limitation by providing a "register" mechanism, but the provided mechanism is not very safe, since it is up to the user not to prematurely close the registered segment.
* structs passed returned by value
* callback segments
In these cases it is necessary for clients to manually handle the life-cycle of these segments with a separate (nested) try with resource, which makes the code harder to follow.
Jextract is currently bypassing this limitation by providing a "register" mechanism, but the provided mechanism is not very safe, since it is up to the user not to prematurely close the registered segment.
- relates to
-
JDK-8247486 CScope class should be removed. NativeScope should be used instead.
-
- Resolved
-
- links to
-
Commit
openjdk/panama-foreign/23cca5d6
-
Commit
openjdk/panama-foreign/d8febd61
-
Commit
openjdk/panama-foreign/febed0ea
-
Review
openjdk/panama-foreign/199
-
Review
openjdk/panama-foreign/201
-
Review
openjdk/panama-foreign/202
(2 links to)