fix: swap ida/idalib link order to fix macOS SIGSEGV#22
Merged
Conversation
Both stub dylibs export overlapping symbols (qvector_reserve, qalloc_or_throw, qfree, qsnprintf — 184 total), but at runtime only libida.dylib actually provides them. With idalib listed first, the macOS two-level namespace linker binds these symbols to libidalib, which doesn't export them at runtime. This causes all IDA memory functions to resolve to a dyld fallback address, resulting in SIGSEGV on any qstring construction. Fix: link libida before libidalib so overlapping symbols bind to the library that actually exports them.
325ebfd to
6bc371c
Compare
0xeb
added a commit
to HexRaysSA/ida-sdk
that referenced
this pull request
Mar 5, 2026
Updates ida-cmake to allthingsida/ida-cmake#22 which swaps the ida/idalib link order in idasdk::idalib to fix SIGSEGV on macOS.
adybov-hexrays
pushed a commit
to HexRaysSA/ida-sdk
that referenced
this pull request
Mar 13, 2026
Updates ida-cmake to allthingsida/ida-cmake#22 which swaps the ida/idalib link order in idasdk::idalib to fix SIGSEGV on macOS.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
IDA_LIB_PATHbeforeIDALIB_PATHin theidasdk::idalibtarget link order to fix a SIGSEGV crash on macOSProblem
Both stub dylibs (
libida.dylibandlibidalib.dylibinlib/arm64_mac_clang_64/) export 184 overlapping symbols includingqvector_reserve,qalloc_or_throw,qfree, andqsnprintf. Withlibidaliblisted first, the macOS linker binds these symbols to it via two-level namespaces.At runtime, the real
libidalib.dylib(1.4MB) does not export these symbols — onlylibida.dylibdoes. The dyld lazy resolver fails silently, resolving all four IDA memory functions to a garbage fallback address (0x19bb0a6f8), causing SIGSEGV on anyqstringconstruction.Verified with
DYLD_PRINT_BINDINGS=1:Test plan
qstringconstruction no longer crasheswelcome,funcs,segments, etc.)🤖 Generated with Claude Code