Scaless / HaloTAS

Halo: Combat Evolved PC Speedrunning Tools
MIT License
6 stars 2 forks source link

DLL may be unloaded before dll_cache value is fully used #12

Open Scaless opened 4 years ago

Scaless commented 4 years ago

After a call to dll_cache::get_info, the DLL may be unloaded before the module has been fully used.

A wrapper to perform a lock on the cached DLL so that FreeLibrary does not pull the rug out under other threads would be good to add to dll_cache.

This situation has generally not been a problem since most of the hooks are in-line with existing code paths and will not trigger a use-after-free, but it could happen in the future.