question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Storage Tuple concat

See original GitHub issue

https://github.com/angr/angr/blob/master/angr/storage/file.py#L191 kwargs['extra_constraints'] = kwargs.get('extra_constraints', ()) + (self._size == size,) should be: kwargs['extra_constraints'] = kwargs.get('extra_constraints', []) + [self._size == size]

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:9 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
rhelmotcommented, Jun 15, 2018

I pushed two things that make your script work. The first is using min to evaluate the filesize instead of eval.

The second is a quick hack to make working with unlinked files more convenient. As an optimization, we don’t actually deepcopy the unlinked files since nobody can ever mutate them anymore, but it does mean that they’re stuck with the state, and thus the constraints, from when they’re unlinked. This is easily fixed by just reassociating them with the state you want to solve against, but this is unintuitive. Now, whenever you access .unlinks, it’ll automatically associate the files with the current state. This will cause problems if you ever pull a reference to a file out of the unlinks list and store it elsewhere, and then try to access a different state’s unlinks containing the same file, but that seems relatively uncommon.

0reactions
Tim-Noscocommented, Jun 22, 2018

Thank you for looking into this!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Python | Ways to concatenate tuples - GeeksforGeeks
Let's discuss certain ways in which this task can be performed. Method #1 : Using + operator This is the most Pythonic and...
Read more >
Concatenating Tuple - python - Stack Overflow
It's quite obvious why, I am trying to concatenate an integer with a tuple. But tuples don't have the same functions as lists...
Read more >
Understanding Tuples in Python 3 - DigitalOcean
Operators can be used to concatenate or multiply tuples. Concatenation is done with the + operator, and multiplication is done with the * ......
Read more >
Ways to concatenate tuples in Python - Tutorialspoint
When it is required to concatenate multiple tuples, the '+' operator can be used. A tuple is an immutable data type.
Read more >
How to Concatenate two Python tuples - YouTube
In this video, we will see how to Concatenate two Python Tuples. Tuple is a sequence in Python, a collection of objects. Python...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found