Skip to content

Conversation

@qkaiser
Copy link
Contributor

@qkaiser qkaiser commented Nov 14, 2025

Moved to a bounds-checked search in Varnode::eraseDescend (Ghidra/Features/Decompiler/src/decompile/cpp/varnode.cc:316) so the descendant list is only mutated when the requested PcodeOp is actually present, preventing invalid std::list::erase calls that previously corrupted the allocator and triggered the segfault.

Builds compiled with OPACTION_DEBUG will now throw a LowlevelError if an unexpected removal is attempted, preserving diagnostics without crashing release builds.

Fixes issue #7321

Note: the sample provided in #7321 and the one described in #7321 (comment) do not reliably trigger a segfault. Not sure how to to unit-test / integration-test this one.

Moved to a bounds-checked search in Varnode::eraseDescend
(Ghidra/Features/Decompiler/src/decompile/cpp/varnode.cc:316) so the
descendant list is only mutated when the requested PcodeOp is actually
present, preventing invalid std::list::erase calls that previously
corrupted the allocator and triggered the segfault.

Builds compiled with OPACTION_DEBUG will now throw a LowlevelError if an
unexpected removal is attempted, preserving diagnostics without crashing
release builds.

Fixes issue NationalSecurityAgency#7321
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Feature: Decompiler Status: Triage Information is being gathered

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Unlimited recursion at ghidra::Heritage::renameRecurse causing decompiler crash

3 participants