[angr] Pickle a Path?

David Manouchehri david.manouchehri at riseup.net
Mon May 22 16:52:22 PDT 2017


You can store stashes to disk, not sure if that works for you or not though.

https://github.com/Manouchehri/angr-doc/blob/pickles/examples/pickle-jar/solve.py
(not functional, but should get you started in the right direction.)

Yan might have a better solution.

On Mon, May 22, 2017 at 11:32 AM, Eric Miller <emiller at endgame.com> wrote:

> 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 section The 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
>
>
>
>
> _______________________________________________
> angr mailing list
> angr at lists.cs.ucsb.edu
> https://lists.cs.ucsb.edu/mailman/listinfo/angr
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.cs.ucsb.edu/pipermail/angr/attachments/20170522/948cbc72/attachment.html>


More information about the angr mailing list