fusesource / jansi-native

Builds the JNI libraries for the jansi project
http://fusesource.github.io/jansi/
Apache License 2.0
33 stars 22 forks source link

Caching bug in (generated ?) code #19

Open tomasjura opened 5 years ago

tomasjura commented 5 years ago

There is serious caching bug in the (generated ?) file jansi_struct.h There is build a cache Termios_FID_CACHE TermiosFc which caches jfieldID in the object. This kind of caching is forbidden. Classes objects could be unloaded and there is no guarantee that the jfieldID after unload and load remains the same. See http://journals.ecs.soton.ac.uk/java/tutorial/native1.1/implementing/refs.html.

This might be also a reason for the issue #17