On Sat Jun 10 19:22:55 2023 +0000, Alex Henrie wrote:
Interesting. That's definitely a problem. The downside to allocating real_path with `HeapAlloc(GetProcessHeap(), ...)` is that we'd have to reimplement strdup. Are you sure that's better than using the CRT in this case?
actually, the best way would be to use the pool_ helpers (each module (DLL with debug info avail) in dbghelp has its own heap, where are stored objects which life time is the one of the module: the main benefit is that the objects are not deallocated one by one, but the heap is destroyed when the module is unloaded) the real_path is just another attribute of the module, so allocating inside the module's pool is the best option
you may have to implement pool_wcsdup though, add the module to struct build_search and remove the deallocation of real_path in module_remove