diff options
author | Michael Haubenwallner <michael.haubenwallner@ssi-schaefer.com> | 2019-05-03 17:14:14 +0300 |
---|---|---|
committer | Corinna Vinschen <corinna@vinschen.de> | 2019-06-03 19:37:52 +0300 |
commit | 6c9ad75a4bd40e9d72a109d17cc9fe6cc754af08 (patch) | |
tree | 9cbe59b77bab70e8f6a0d11a26044e345b8013e8 /winsup/cygwin/dll_init.cc | |
parent | d5daede26c651f4e9d6c7abbd2dd2937a1e24e2d (diff) |
Cygwin: dll_list: stat_real_file_once with ntname
NtQueryVirtualMemory for MemorySectionName may return some old path even
if the process was just started, for when some directory in between was
renamed - maybe because the NT file cache is hot for the old path still.
This was seen during gcc bootstrap, returning a MemorySectionName of
".../gcc/xgcc.exe" even if started as ".../prev-gcc/xgcc.exe", where the
directory rename from "gcc" to "prev-gcc" was done the moment before.
As we stat the module's real file right after loading now, there is no
point in using NtQueryVirtualMemory with MemorySectionName any more, and
we can use what GetModuleFileName returned instead.
Diffstat (limited to 'winsup/cygwin/dll_init.cc')
-rw-r--r-- | winsup/cygwin/dll_init.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/winsup/cygwin/dll_init.cc b/winsup/cygwin/dll_init.cc index 4ba1bd22d..6a4ed269e 100644 --- a/winsup/cygwin/dll_init.cc +++ b/winsup/cygwin/dll_init.cc @@ -381,7 +381,7 @@ dll_list::alloc (HINSTANCE h, per_process *p, dll_type type) *d->forkable_ntname = L'\0'; } if (forkables_supported ()) - d->stat_real_file_once (); /* uses nt_max_path_buf () */ + d->stat_real_file_once (); append (d); if (type == DLL_LOAD) loaded_dlls++; |