pschanely / CrossHair

An analysis tool for Python that blurs the line between testing and type systems.
Other
1.03k stars 49 forks source link

Support literal dictionaries with symbolic keys #154

Open pschanely opened 2 years ago

pschanely commented 2 years ago

Similar to #114, literal map constructions with symbolic keys will not be analyzable.

We'll need to intercept the BUILD_MAP and BUILD_CONST_KEY_MAP opcodes and upgrade the return to a symbolic dictionary.

pschanely commented 2 years ago

Note: here is an example where we'd like to be able to find the counterexample: https://crosshair-web.org/?crosshair=0.1&python=3.8&gist=79cb9a330f194e444a7c64c727fed781

This might be an appropriate hacktoberfest issue for someone that already knows about CPython bytecode, or wants to learn about this.