ghidra icon indicating copy to clipboard operation
ghidra copied to clipboard

Fix/xml mutexes

Open whoismissing opened this issue 2 years ago • 0 comments

In the call tree of openDocument() -> parseDocument() -> xml_tree() -> xml_parse(), the global variables global_scan and handler are set.

When openDocument() is used in a multithreaded environment, both variables are modified without a thread locking mechanism.

This was discovered while implementing bindings to the sleigh library and is a reproducible SIGSEGV as tracked by https://github.com/angr/pypcode/pull/30

The fixes in this PR are ported from sleighcraft.

whoismissing avatar Jul 14 '22 11:07 whoismissing