Skip to content

Conversation

@x9090
Copy link

@x9090 x9090 commented Nov 13, 2025

This commit fixes the crashes on the tool when it encounters cfg thunks guard_dispatch_icall$thunk$xxx that was dereferenced to extended image memory located at ntdll by OS kernel, which leads to invalid memory for private library.

Apart from that, redirect_GetModuleFileNameW seems to be broken as it returns the ascii version for the filename instead of unicode version.

Fixes #7487

…bove

This commit fixes the crashes on the tool when it encounters cfg thunks `guard_dispatch_icall$thunk$xxx` that was dereferenced to extended image memory located at ntdll by OS kernel, which leads to invalid memory for private library.

Apart from that, `redirect_GetModuleFileNameW` seems to be broken as it returns the ascii version for the filename instead of unicode version.

Fixes DynamoRIO#7487
@x9090
Copy link
Author

x9090 commented Nov 13, 2025

Apparently, the fix in redirect_GetModuleFileNameW has uncovered the broken drsyms module, which was revealed when I called the drsym_lookup_symbol. I will create a separate issues to explain the broken drsyms module on Windows which is somewhat related to the currently unsupported delay-loaded DLL that contains TLS.

From the CI's logs, it turns out that the tools/applications attempt to call drsyms module will lead to the loading of symsrv.dll which is currently not found in the build directory.

2025-11-13T03:13:48.6140630Z 204: Test command: D:\a\dynamorio\dynamorio\build_debug-internal-64\bin64\drrun.exe "-s" "90" "-quiet" "-debug" "-use_dll" "D:/a/dynamorio/dynamorio/build_debug-internal-64/lib64/debug/dynamorio.dll" "-exit0" "-stderr_mask" "0xC" "-msgbox_mask" "0" "-dumpcore_mask" "0x7d" "-staged" "-code_api" "-c" "D:/a/dynamorio/dynamorio/build_debug-internal-64/api/samples/../bin/instrcalls.dll" "--" "D:/a/dynamorio/dynamorio/build_debug-internal-64/suite/tests/bin/common.eflags.exe"
2025-11-13T03:13:48.6926549Z 204: Working Directory: D:/a/dynamorio/dynamorio/build_debug-internal-64/suite/tests
2025-11-13T03:13:48.7241676Z 204: Test timeout computed to be: 120
2025-11-13T03:13:48.8021294Z 204: <Application D:\a\dynamorio\dynamorio\build_debug-internal-64\suite\tests\bin\common.eflags.exe (2096). Unable to load client library: D:\a\dynamorio\dynamorio\build_debug-internal-64\api\bin/symsrv.dll
2025-11-13T03:13:48.8957432Z 204: 	Cannot find library.>

@ivankyluk
Copy link
Contributor

Thank you for contributing. Please request a review when all the tests have passed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Unexpected result from pipe! expected 'P', instead received 'C'

2 participants