Vector35 / binaryninja-api

Public API, examples, documentation and issues for Binary Ninja
https://binary.ninja/
MIT License
898 stars 202 forks source link

Proper lifting of atomic operations #5066

Open alexrp opened 7 months ago

alexrp commented 7 months ago

As I'm delving deeper into multithreaded code, the lack of proper lifting for atomic operations is starting to become a bit of a problem.

Some examples:

image image

There's no obvious indicator that these are actually lock cmpxchg and lock inc respectively. You'd only realize that if you switch over to disassembly. This can lead to bugs if I start writing code that interoperates with the decompiled code in question but doesn't do operations atomically because I missed that detail.

(Is this already tracked somewhere? I seem to recall it being discussed on other issues, but couldn't find anything.)

yrp604 commented 7 months ago

It's not an answer but same question here: https://github.com/Vector35/arch-arm64/discussions/117