Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IDA crashes when running the debug version #17

Open
dongpengxu opened this issue Mar 4, 2025 · 1 comment
Open

IDA crashes when running the debug version #17

dongpengxu opened this issue Mar 4, 2025 · 1 comment

Comments

@dongpengxu
Copy link

Describe the bug
IDA decompiler crashes when running the debug version of unflattener.

To Reproduce
Steps to reproduce the behavior:

  1. cmake --build . --config Debug -j 4 --clean-first
  2. copy the hrtng.dll to IDA's plugins directory.

Expected behavior
Use IDA to open a binary that contains a flattened function. Hit F5 and then the decompilation fails. IDA pops a warning window saying "IDA has encountered a problem. It is recommended to save your work and restart IDA. A mini dump file has been created in ..."

Desktop

  • OS: windows 10
  • IDA 8.4 and IDA 9.0

Additional context
The call stack when IDA crashes:

hrtng64.dll!block_chains_t::get_chain(const chain_t & ch) Line 10870
hrtng64.dll!block_chains_t::get_chain(const voff_t & k, int width) Line 3403
hrtng64.dll!JcMapper::FindComparesInUseChain(int defBlk, mop_t * cmpVar) Line 433
hrtng64.dll!CFFlattenInfo::GetAssignedAndComparisonVariables(mba_t * mba) Line 808
hrtng64.dll!CFUnflattener::run(mba_t * mba) Line 1618
hrtng64.dll!unflattening(mba_t * mba) Line 1943

@srgblv
Copy link
Collaborator

srgblv commented Mar 4, 2025

Honestly speaking, I don't known where is the bug and how to fix it. The decompiler crashes somewhere deep inside hexx64.dll on accessing memory by the bad pointer (0x10). It is looks like somewhere NULL pointer check is missing.

I've tried to check Debug build of hrtng with some older IDA:
IDA 7.7 and 8.1 - work well
IDA 8.3 and later - crash

I cant help here, sorry. Please try to ask help on Hex-Rays or use older IDA version for debugging.

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

No branches or pull requests

2 participants