[angr] Pickle a Path?

Eric Miller emiller at endgame.com
Mon May 22 08:32:24 PDT 2017


Guys,


Angr is such a great tool, I'm a big fan, you guys have done something 
really cool with it...


So...I was wondering if it is possible to make the Path object be able 
to be serialized and written to disk by some python mechanism like 
Pickle/Dill?


I have been using Angr on some larger code that is taking up a lot of 
memory (on a machine with 64 GB RAM).  And even though I'm using 
Veritesting to reduce path explosion, it soon runs out of memory and 
grinds to a halt.


So the question is, do you think the Path object could be made 
Pickle-able so I could just write new found (successor) paths to disk 
and thereby just operate on one path at a time and conserve memory?


I tried to call Pickle/Dill on a Path object, but it fails.  I can see 
the key object to be able to store to disk (within Path object) would be 
path.state.


So the python 2 docs say this about Pickle:

The following types can be pickled:

  * |None|,|True|, and|False|
  * integers, long integers, floating point numbers, complex numbers
  * normal and Unicode strings
  * tuples, lists, sets, and dictionaries containing only picklable objects
  * functions defined at the top level of a module
  * built-in functions defined at the top level of a module
  * classes that are defined at the top level of a module
  * instances of such classes whose|__dict__|
    <https://docs.python.org/2/library/stdtypes.html#object.__dict__>or
    the result of calling|__getstate__()|
    <https://docs.python.org/2/library/pickle.html#object.__getstate__>is
    picklable (see sectionThe pickle protocol
    <https://docs.python.org/2/library/pickle.html#pickle-protocol>for
    details).


Do you think Path could be Pickled? and written to disk somehow?


Thanks so much,

EM



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.cs.ucsb.edu/pipermail/angr/attachments/20170522/fc3df517/attachment.html>


More information about the angr mailing list