Closed JohnMcPMS closed 2 years ago
DetourEnumerateModules
appears to be flaky; failing in one flavor last build and two this time (both debug/2019).
-------------------------------------------------------------------------------
DetourEnumerateModules
Passing nullptr, results in current module being returned
-------------------------------------------------------------------------------
test_module_api.cpp(237)
...............................................................................
test_module_api.cpp(243): PASSED:
REQUIRE( GetLastError() == 0L )
with expansion:
0 == 0
test_module_api.cpp(244): FAILED:
REQUIRE( mod == reinterpret_cast<HMODULE>(&__ImageBase) )
with expansion:
0x005b0000 == 0x01260000
0.000 s: Passing nullptr, results in current module being returned
0.000 s: DetourEnumerateModules
-------------------------------------------------------------------------------
None of my changes should have affected this function. Maybe ASLR is enabled on the 2019 server images? This test expects that the first module in memory is the exe, and given the behavior it seems the most likely culprit.
That sounds plausible. The base address of .exes used to be quite predictable.
I sent out PR #227 to fix the test, thanks for pointing that out!
This pull request has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for 7 days.
@bgianfo , what changes are still needed?
@bgianfo , what changes are still needed?
Sorry, no re-review was requested, so I didn't know it was ready. Merged, thanks!
A few minor changes:
detour_is_imported
via a new public functionDetourIsFunctionImported
pbTarget
before casting to smaller typeMicrosoft Reviewers: Open in CodeFlow