some cppunit test failures on windows11 24H2 (vs 22H2)
Categories
(Testing :: CPPUnitTest, defect)
Tracking
(firefox135 fixed)
Tracking | Status | |
---|---|---|
firefox135 | --- | fixed |
People
(Reporter: jmaher, Assigned: handyman)
References
(Blocks 1 open bug)
Details
Attachments
(1 file)
while running tests on windows 11 24H2 (major windows update Oct 2024) vs what we have in CI (22H2 - Oct 2022), there are some differences. Specifically a cppunit test failure, here is a diff to fix it:
diff --git a/toolkit/xre/dllservices/tests/TestDllInterceptor.cpp b/toolkit/xre/dllservices/tests/TestDllInterceptor.cpp
--- a/toolkit/xre/dllservices/tests/TestDllInterceptor.cpp
+++ b/toolkit/xre/dllservices/tests/TestDllInterceptor.cpp
@@ -1534,8 +1534,8 @@ extern "C" int wmain(int argc, wchar_t*
#endif // !defined(_M_ARM64)
#if !defined(_M_ARM64)
TEST_HOOK("kernel32.dll", TlsAlloc, NotEquals, TLS_OUT_OF_INDEXES) &&
- TEST_HOOK_PARAMS("kernel32.dll", TlsFree, Equals, FALSE,
- TLS_OUT_OF_INDEXES) &&
+ // TEST_HOOK_PARAMS("kernel32.dll", TlsFree, Equals, FALSE,
+ // TLS_OUT_OF_INDEXES) &&
TEST_HOOK("kernel32.dll", CloseHandle, Equals, FALSE) &&
TEST_HOOK("kernel32.dll", DuplicateHandle, Equals, FALSE) &&
#endif // !defined(_M_ARM64)
and the output from the failing log file:
[task 2024-12-06T16:32:47.770Z] 16:32:47 INFO - TEST-PASS | WindowsDllInterceptor | Executed hooked function TlsAlloc from kernel32.dll
[task 2024-12-06T16:32:47.770Z] 16:32:47 INFO - [9192] Assertion failure: false (MOZ_ASSERT_UNREACHABLE: Opcode sequence includes commands after JMP), at /builds/worker/workspace/obj-build/dist/include/mozilla/interceptor/PatcherDetour.h:1134
[task 2024-12-06T16:32:47.771Z] 16:32:47 INFO - #01: mozilla::interceptor::WindowsDllDetourPatcher<mozilla::interceptor::VMSharingPolicyShared>::CreateTrampoline(mozilla::interceptor::ReadOnlyTargetFunction<mozilla::interceptor::MMPolicyInProcess>&, mozilla::interceptor::TrampolinePool<mozilla::interceptor::VMSharingPolicyShared,mozilla::interceptor::TrampolinePool<mozilla::interceptor::VMSharingPolicyUnique<mozilla::interceptor::MMPolicyInProcess>,std::nullptr_t> >*, mozilla::interceptor::Trampoline<mozilla::interceptor::MMPolicyInProcess>&, long long, void**) [toolkit/xre/dllservices/mozglue/interceptor/PatcherDetour.h:1134]
[task 2024-12-06T16:32:47.771Z] 16:32:47 INFO - #02: mozilla::interceptor::WindowsDllDetourPatcher<mozilla::interceptor::VMSharingPolicyShared>::AddHook(long long (*)(), long long, void**) [toolkit/xre/dllservices/mozglue/interceptor/PatcherDetour.h:477]
[task 2024-12-06T16:32:47.772Z] 16:32:47 INFO - #03: mozilla::interceptor::WindowsDllInterceptor<mozilla::interceptor::VMSharingPolicyShared>::AddHook(char const*, long long, void**) [toolkit/xre/dllservices/mozglue/nsWindowsDllInterceptor.h:435]
[task 2024-12-06T16:32:47.773Z] 16:32:47 INFO - #04: mozilla::interceptor::FuncHook<mozilla::interceptor::WindowsDllInterceptor<mozilla::interceptor::VMSharingPolicyShared>,int (*)(unsigned long)>::InitOnceCallback(_RTL_RUN_ONCE*, void*, void**) [toolkit/xre/dllservices/mozglue/nsWindowsDllInterceptor.h:203]
[task 2024-12-06T16:32:47.773Z] 16:32:47 INFO - #05: RtlRunOnceExecuteOnce [C:\Windows\SYSTEM32\ntdll.dll + 0x7ced5]
[task 2024-12-06T16:32:47.773Z] 16:32:47 INFO - #06: InitOnceExecuteOnce [C:\Windows\System32\KERNELBASE.dll + 0xa1c01]
[task 2024-12-06T16:32:47.773Z] 16:32:47 INFO - #07: TestHook<int (*)(unsigned long),13,bool (*)(int),unsigned long>(const char[13]&, char const*, bool (*&&)(int), unsigned long&&) [toolkit/xre/dllservices/tests/TestDllInterceptor.cpp:354]
[task 2024-12-06T16:32:47.774Z] 16:32:47 INFO - #08: wmain(int, wchar_t**) [toolkit/xre/dllservices/tests/TestDllInterceptor.cpp:1485]
[task 2024-12-06T16:32:47.774Z] 16:32:47 INFO - #09: __scrt_common_main_seh() [/builds/worker/workspace/obj-build/toolkit/xre/dllservices/tests/D:/a/_work/1/s/src/vctools/crt/vcstartup/src/startup/exe_common.inl:288]
[task 2024-12-06T16:32:47.774Z] 16:32:47 INFO - #10: BaseThreadInitThunk [C:\Windows\System32\KERNEL32.DLL + 0x2dbe7]
[task 2024-12-06T16:32:47.774Z] 16:32:47 INFO - #11: RtlUserThreadStart [C:\Windows\SYSTEM32\ntdll.dll + 0xdfbec]
[task 2024-12-06T16:32:47.775Z] 16:32:47 INFO - mozcrash checking C:\Users\task_173350249183590\AppData\Local\Temp\tmpz3apc3yv for minidumps...
[task 2024-12-06T16:32:47.775Z] 16:32:47 WARNING - TEST-UNEXPECTED-FAIL | TestDllInterceptor.exe | test failed with return code 2147483651
[task 2024-12-06T16:32:47.775Z] 16:32:47 INFO - TEST-INFO took 769ms
Reporter | ||
Comment 1•2 months ago
|
||
to run this on try, you can:
./mach try fuzzy -q 'test-windows11-64 cppunit' --worker-override='win11-64-2009=gecko-t/win11-64-24h2' --worker-override='win11-64-2009-gpu=gecko-t/win11-64-24h2-gpu' --worker-override='win11-64-2009-source=gecko-t/win11-64-24h2-source' --worker-override='win11-64-2009-ssd=gecko-t/win11-64-24h2-ssd' --worker-override='win11-64-2009-ssd-gpu=gecko-t/win11-64-24h2-ssd-gpu' --push-to-vcs
Reporter | ||
Comment 2•2 months ago
|
||
following up here? I am probably going to comment out this specific test for kernel32.dll/tlsfree to move forward.
Assignee | ||
Comment 3•2 months ago
•
|
||
I can take this. TlsFree
was intercepted in Bug 1320134 many years ago. That bug also has the patch that did the removal of the interception, which landed a year or so later. So we aren't intercepting TlsFree and it can be removed from the test. I'll try to post a patch today. It should also remove the TlsAlloc
check.
Assignee | ||
Comment 4•2 months ago
|
||
Interception for these functions was both added in bug 1320134 and removed
in the same bug a year later. We have not intercepted them since 2017.
Comment 6•2 months ago
|
||
bugherder |
Description
•