Eclagent has a QueryTerminationCleanup that's there to ensure that the TLS hooks are called before the query dll is unloaded.
However QueryTerminationCleanup calls the hooks with isPooled=true, implying that the hooks should be kept and that the objects will be reused.
In Eclagent that means that that any objects created in the main thread will not be deleted and will still exist until atexit, by which time the hook function in the shared library will not be valid. So it will cause a crash.