gecko-dev/mozglue/baseprofiler
Toshihito Kikuchi 0d9e48e427 Bug 1702086 - Make sure LoadLibraryEx really locks the mapped address. r=mstange
Before `SharedLibraryInfo::GetInfoForSelf` calls `GetPdbInfo` to parse a module's
PE header, it calls `LoadLibraryEx` to prevent the module from being unloaded
during `GetPdbInfo`.  If the module was already unloaded before `LoadLibraryEx`,
however, `LoadLibraryEx` maps the module onto an address different from the original
mapped address, so that `module.lpBaseOfDll` becomes invalid.

This patch is to call `LoadLibraryEx` before `GetModuleInformation` to make sure
`LoadLibraryEx` increments the module's refcount and does not map the module onto
a new address.  With this, `module.lpBaseOfDll` is always valid, thus we don't have
to call `VirtualQuery`.

Differential Revision: https://phabricator.services.mozilla.com/D110421
2021-04-01 00:35:01 +00:00
..
core Bug 1702086 - Make sure LoadLibraryEx really locks the mapped address. r=mstange 2021-04-01 00:35:01 +00:00
lul
public Bug 1698129 - Rename browsingContextID to tabID inside the profiler codebase r=julienw,gerald,devtools-backward-compat-reviewers 2021-03-25 12:52:10 +00:00
moz.build Bug 1693037 - Fix non-MOZ_GECKO_PROFILER builds - r=florian 2021-02-17 22:36:28 +00:00