Skip to content

Delay-load dbghelp.dll in bindiff_similarity (Fix #1860) - #8452

Open
xusheng6 wants to merge 1 commit into
devfrom
test_1860_bindiff_dbghelp_delayload
Open

Delay-load dbghelp.dll in bindiff_similarity (Fix #1860)#8452
xusheng6 wants to merge 1 commit into
devfrom
test_1860_bindiff_dbghelp_delayload

Conversation

@xusheng6

Copy link
Copy Markdown
Member

bindiff_similarity links bindiff/binexport, which pull in Abseil's Win32 symbolizer and its static import of dbghelp.dll. Plugin init therefore maps System32's dbghelp before the debugger can load the WinDbg copy by full path. PE imports resolve by base name, so dbgeng.dll binds against the wrong one and fails with ERROR_PROC_NOT_FOUND (WinDbg 29547 needs SymGetSymbolsNegativeAuthCache, absent from System32 dbghelp 26100).

/DELAYLOAD:dbghelp.dll defers the bind until the symbolizer is actually used. Same treatment binaryninjacore, crashreporter, debuggercore and the upstream bindiff/binexport plugin targets already have.

Vector35/binaryninja#1860

bindiff_similarity links bindiff/binexport, which pull in Abseil's Win32
symbolizer and its static import of dbghelp.dll. Plugin init therefore maps
C:\Windows\System32\dbghelp.dll into the process before the debugger gets a
chance to load the WinDbg copy it needs by full path. PE imports resolve by
base name, so the already-mapped System32 module wins and dbgeng.dll fails to
load with ERROR_PROC_NOT_FOUND -- WinDbg 10.0.29547's dbgeng needs
SymGetSymbolsNegativeAuthCache, which System32 dbghelp 10.0.26100 does not
export. The result is "Failed to load DbgEng DLLs, the DbgEng adapter cannot
work properly" whenever bindiff_similarity is present.

/DELAYLOAD:dbghelp.dll defers the bind until the symbolizer is actually used,
matching what binaryninjacore, crashreporter, debuggercore and the upstream
bindiff/binexport plugin targets already do.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015SdEhA6Lo2qAi7YjarCxQY
@xusheng6
xusheng6 force-pushed the test_1860_bindiff_dbghelp_delayload branch from cf287c6 to 750bc42 Compare August 22, 2026 00:21
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.

1 participant