gecko-dev/mozglue
David Parks 5730f5fc1c Bug 1546546: Part 3 - TestDllInterceptor must leave intercepted functions operable r=aklotz
In part 1, we disabled the unhooking of DLL-intercepted functions at shutdown.  The TestDllInterceptor relied on unhooking -- it worked by hooking functions with a "nonsense function" (nullptr) and then immediately unhooking it.  That restored the original function behavior.  Some hooked functions (e.g. NtWriteFile) are used by functions later in the program (e.g. printf) so the functions need to maintain their behavior.

This patch replaces the nonsense function with an identity function that also sets a global boolean as a side-effect.  The function is written in machine code.  x86-32, x86-64, and aarch64 variants are included.

Differential Revision: https://phabricator.services.mozilla.com/D30244

--HG--
extra : moz-landing-system : lando
2019-05-08 00:26:59 +00:00
..
android
build Bug 1545355: Uppercase hash tags before calling WinVerifyTrust on catalog files; r=mhowell 2019-05-07 16:58:24 +00:00
linker
misc Bug 1546546: Part 1 - Never unhook DLL-intercepted functions upon VMSharingPolicyShared destruction r=aklotz 2019-05-08 00:25:35 +00:00
tests Bug 1546546: Part 3 - TestDllInterceptor must leave intercepted functions operable r=aklotz 2019-05-08 00:26:59 +00:00
moz.build