Feb 16, 2017, 5:27:55 AM2/16/17
I`m using Openssl 1.1 in a multi threading server java environment. I experienced the following issue. We use Phantom References instead of overwriting the finalize method and a reaper thread for freeing native resources. But with more and more requests I see that the called free of structures are not really freed, I use the mem debug facility of openssl to track memory leaks.
My question is it a problem to malloc memory in a worker thread and release that memory later in a different reaper thread? I think yes because when I release the memory inside the worker thread the memory leaks are gone. But in some rare cases where we`ve implemented the java signature class it is cached on provider level and we have to use the reaper thread, becuase by design you have not access to that SPI classes.