-
Bug
-
Resolution: Fixed
-
P3
-
None
-
repo-panama
The javadoc of LibraryLookup goes to some lengths to explain how method handles created by linkers keep the lookup alive (so that the library cannot be unloaded).
There's however no discussion on how a client is supposed to create a memory segment out of a lookup symbol (e.g. for global variables). Given that keeping the lookup alive is important (otherwise dereferencing the global variable might fail in unexpected ways), the javadoc should recommend that restricted segments should always be created with the lookup symbol as an attachment.
There's however no discussion on how a client is supposed to create a memory segment out of a lookup symbol (e.g. for global variables). Given that keeping the lookup alive is important (otherwise dereferencing the global variable might fail in unexpected ways), the javadoc should recommend that restricted segments should always be created with the lookup symbol as an attachment.