angr 9.2.118__py3-none-manylinux2014_aarch64.whl → 9.2.119__py3-none-manylinux2014_aarch64.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of angr might be problematic. Click here for more details.

Files changed (76) hide show
  1. angr/__init__.py +1 -1
  2. angr/analyses/analysis.py +43 -1
  3. angr/analyses/cfg/cfg_fast.py +135 -23
  4. angr/analyses/decompiler/ail_simplifier.py +1 -1
  5. angr/analyses/decompiler/clinic.py +23 -12
  6. angr/analyses/decompiler/condition_processor.py +41 -16
  7. angr/analyses/decompiler/decompiler.py +3 -0
  8. angr/analyses/decompiler/jumptable_entry_condition_rewriter.py +1 -1
  9. angr/analyses/decompiler/optimization_passes/duplication_reverter/ail_merge_graph.py +7 -4
  10. angr/analyses/decompiler/optimization_passes/duplication_reverter/duplication_reverter.py +6 -2
  11. angr/analyses/decompiler/optimization_passes/inlined_string_transformation_simplifier.py +19 -19
  12. angr/analyses/decompiler/structured_codegen/c.py +9 -2
  13. angr/analyses/decompiler/structuring/dream.py +8 -7
  14. angr/analyses/decompiler/structuring/phoenix.py +3 -3
  15. angr/analyses/propagator/engine_ail.py +2 -1
  16. angr/analyses/reaching_definitions/function_handler.py +6 -2
  17. angr/analyses/stack_pointer_tracker.py +29 -11
  18. angr/analyses/typehoon/translator.py +19 -2
  19. angr/analyses/typehoon/typeconsts.py +8 -0
  20. angr/analyses/variable_recovery/engine_vex.py +7 -10
  21. angr/calling_conventions.py +69 -24
  22. angr/concretization_strategies/norepeats.py +3 -3
  23. angr/engines/concrete.py +1 -1
  24. angr/engines/light/engine.py +6 -11
  25. angr/engines/pcode/engine.py +2 -2
  26. angr/engines/soot/engine.py +5 -5
  27. angr/engines/soot/expressions/condition.py +1 -1
  28. angr/engines/soot/statements/goto.py +1 -1
  29. angr/engines/soot/statements/if_.py +1 -1
  30. angr/engines/soot/statements/throw.py +1 -1
  31. angr/engines/successors.py +1 -1
  32. angr/engines/unicorn.py +2 -2
  33. angr/engines/vex/heavy/heavy.py +2 -2
  34. angr/errors.py +4 -0
  35. angr/exploration_techniques/driller_core.py +2 -3
  36. angr/exploration_techniques/suggestions.py +2 -2
  37. angr/knowledge_plugins/cfg/cfg_model.py +2 -1
  38. angr/knowledge_plugins/cfg/memory_data.py +1 -0
  39. angr/misc/telemetry.py +54 -0
  40. angr/procedures/java/unconstrained.py +1 -1
  41. angr/procedures/java_jni/__init__.py +21 -13
  42. angr/procedures/java_jni/string_operations.py +1 -1
  43. angr/procedures/java_lang/double.py +1 -1
  44. angr/procedures/java_lang/string.py +1 -1
  45. angr/procedures/java_util/scanner_nextline.py +1 -1
  46. angr/procedures/linux_kernel/vsyscall.py +1 -1
  47. angr/procedures/stubs/Redirect.py +1 -1
  48. angr/procedures/stubs/UserHook.py +1 -1
  49. angr/procedures/stubs/format_parser.py +1 -1
  50. angr/sim_procedure.py +5 -5
  51. angr/sim_state.py +21 -34
  52. angr/sim_type.py +42 -0
  53. angr/simos/javavm.py +7 -12
  54. angr/simos/linux.py +1 -1
  55. angr/simos/simos.py +1 -1
  56. angr/simos/windows.py +1 -1
  57. angr/state_hierarchy.py +1 -1
  58. angr/state_plugins/preconstrainer.py +2 -2
  59. angr/state_plugins/scratch.py +1 -1
  60. angr/state_plugins/solver.py +1 -1
  61. angr/state_plugins/trace_additions.py +8 -8
  62. angr/storage/file.py +12 -12
  63. angr/storage/memory_mixins/actions_mixin.py +1 -1
  64. angr/storage/memory_mixins/convenient_mappings_mixin.py +6 -8
  65. angr/storage/memory_mixins/multi_value_merger_mixin.py +5 -5
  66. angr/storage/memory_mixins/paged_memory/pages/ultra_page.py +1 -1
  67. angr/storage/memory_mixins/size_resolution_mixin.py +1 -1
  68. angr/storage/memory_mixins/smart_find_mixin.py +2 -2
  69. angr/storage/memory_object.py +7 -9
  70. angr/utils/timing.py +30 -18
  71. {angr-9.2.118.dist-info → angr-9.2.119.dist-info}/METADATA +8 -6
  72. {angr-9.2.118.dist-info → angr-9.2.119.dist-info}/RECORD +76 -75
  73. {angr-9.2.118.dist-info → angr-9.2.119.dist-info}/LICENSE +0 -0
  74. {angr-9.2.118.dist-info → angr-9.2.119.dist-info}/WHEEL +0 -0
  75. {angr-9.2.118.dist-info → angr-9.2.119.dist-info}/entry_points.txt +0 -0
  76. {angr-9.2.118.dist-info → angr-9.2.119.dist-info}/top_level.txt +0 -0
@@ -11,6 +11,7 @@ def obj_bit_size(o):
11
11
 
12
12
 
13
13
  # TODO: get rid of is_bytes and have the bytes-backed objects be a separate class
14
+ # pylint: disable=too-many-positional-arguments
14
15
 
15
16
 
16
17
  class SimMemoryObject:
@@ -56,10 +57,6 @@ class SimMemoryObject:
56
57
  def variables(self):
57
58
  return self.object.variables
58
59
 
59
- @property
60
- def cache_key(self):
61
- return self.object.cache_key
62
-
63
60
  @property
64
61
  def symbolic(self):
65
62
  return self.object.symbolic
@@ -88,7 +85,7 @@ class SimMemoryObject:
88
85
  def bytes_at(self, addr, length, allow_concrete=False, endness="Iend_BE"):
89
86
  rev = endness != self.endness
90
87
  if allow_concrete and rev:
91
- raise Exception("allow_concrete must be used with the stored endness")
88
+ raise ValueError("allow_concrete must be used with the stored endness")
92
89
 
93
90
  if self.is_bytes:
94
91
  if addr == self.base and length == self.length:
@@ -125,7 +122,7 @@ class SimMemoryObject:
125
122
 
126
123
  if self.is_bytes:
127
124
  return self.object == other.object
128
- return self.object.cache_key == other.object.cache_key
125
+ return self.object.hash() == other.object.hash()
129
126
 
130
127
  def _length_equals(self, other):
131
128
  if type(self.length) is not type(other.length):
@@ -133,7 +130,7 @@ class SimMemoryObject:
133
130
 
134
131
  if isinstance(self.length, int):
135
132
  return self.length == other.length
136
- return self.length.cache_key == other.length.cache_key
133
+ return self.length.hash() == other.length.hash()
137
134
 
138
135
  def __eq__(self, other):
139
136
  if self is other:
@@ -145,8 +142,7 @@ class SimMemoryObject:
145
142
  return self.base == other.base and self._object_equals(other) and self._length_equals(other)
146
143
 
147
144
  def __hash__(self):
148
- obj_hash = hash(self.object) if self.is_bytes else self.object.cache_key
149
- return hash((obj_hash, self.base, hash(self.length)))
145
+ return hash((self.object, self.base, self.length))
150
146
 
151
147
  def __ne__(self, other):
152
148
  return not self == other
@@ -156,6 +152,8 @@ class SimMemoryObject:
156
152
 
157
153
 
158
154
  class SimLabeledMemoryObject(SimMemoryObject):
155
+ """SimLabeledMemoryObject is a SimMemoryObject with a label"""
156
+
159
157
  __slots__ = ("label",)
160
158
 
161
159
  def __init__(self, obj, base, endness, length=None, byte_width=8, label=None):
angr/utils/timing.py CHANGED
@@ -14,31 +14,43 @@ time_distribution = defaultdict(list)
14
14
  depth = 0
15
15
 
16
16
 
17
+ def _t():
18
+ return time.perf_counter_ns() / 1000000
19
+
20
+
21
+ def _on_func_return(func, start: float) -> None:
22
+ global depth
23
+
24
+ millisec = _t() - start
25
+ sec = millisec / 1000
26
+ if PRINT:
27
+ indent = " " * ((depth - 1) * 2)
28
+ if sec > 1.0:
29
+ print(f"[timing] {indent}{func.__name__} took {sec:f} seconds ({millisec:f} milliseconds).")
30
+ else:
31
+ print(f"[timing] {indent}{func.__name__} took {millisec:f} milliseconds.")
32
+ total_time[func] += millisec
33
+ if TIME_DISTRIBUTION:
34
+ time_distribution[func].append(millisec)
35
+ depth -= 1
36
+
37
+
17
38
  def timethis(func):
18
39
  @wraps(func)
19
40
  def timed_func(*args, **kwargs):
20
41
  if TIMING:
21
-
22
- def _t():
23
- return time.perf_counter_ns() / 1000000
24
-
25
42
  global depth
26
- depth += 1
27
43
 
44
+ depth += 1
28
45
  start = _t()
29
- r = func(*args, **kwargs)
30
- millisec = _t() - start
31
- sec = millisec / 1000
32
- if PRINT:
33
- indent = " " * ((depth - 1) * 2)
34
- if sec > 1.0:
35
- print(f"[timing] {indent}{func.__name__} took {sec:f} seconds ({millisec:f} milliseconds).")
36
- else:
37
- print(f"[timing] {indent}{func.__name__} took {millisec:f} milliseconds.")
38
- total_time[func] += millisec
39
- if TIME_DISTRIBUTION:
40
- time_distribution[func].append(millisec)
41
- depth -= 1
46
+ r = None
47
+ try:
48
+ r = func(*args, **kwargs)
49
+ except Exception:
50
+ _on_func_return(func, start)
51
+ raise
52
+
53
+ _on_func_return(func, start)
42
54
  return r
43
55
  return func(*args, **kwargs)
44
56
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: angr
3
- Version: 9.2.118
3
+ Version: 9.2.119
4
4
  Summary: A multi-architecture binary analysis toolkit, with the ability to perform dynamic symbolic execution and various static analyses on binaries
5
5
  Home-page: https://github.com/angr/angr
6
6
  License: BSD-2-Clause
@@ -15,13 +15,13 @@ Description-Content-Type: text/markdown
15
15
  License-File: LICENSE
16
16
  Requires-Dist: CppHeaderParser
17
17
  Requires-Dist: GitPython
18
- Requires-Dist: ailment==9.2.118
19
- Requires-Dist: archinfo==9.2.118
18
+ Requires-Dist: ailment==9.2.119
19
+ Requires-Dist: archinfo==9.2.119
20
20
  Requires-Dist: cachetools
21
21
  Requires-Dist: capstone==5.0.3
22
22
  Requires-Dist: cffi>=1.14.0
23
- Requires-Dist: claripy==9.2.118
24
- Requires-Dist: cle==9.2.118
23
+ Requires-Dist: claripy==9.2.119
24
+ Requires-Dist: cle==9.2.119
25
25
  Requires-Dist: dpkt
26
26
  Requires-Dist: itanium-demangler
27
27
  Requires-Dist: mulpyplexer
@@ -31,7 +31,7 @@ Requires-Dist: protobuf>=3.19.0
31
31
  Requires-Dist: psutil
32
32
  Requires-Dist: pycparser>=2.18
33
33
  Requires-Dist: pyformlang
34
- Requires-Dist: pyvex==9.2.118
34
+ Requires-Dist: pyvex==9.2.119
35
35
  Requires-Dist: rich>=13.1.0
36
36
  Requires-Dist: sortedcontainers
37
37
  Requires-Dist: sympy
@@ -47,6 +47,8 @@ Requires-Dist: sphinx; extra == "docs"
47
47
  Requires-Dist: sphinx-autodoc-typehints; extra == "docs"
48
48
  Provides-Extra: pcode
49
49
  Requires-Dist: pypcode~=3.0; extra == "pcode"
50
+ Provides-Extra: telemetry
51
+ Requires-Dist: opentelemetry-api; extra == "telemetry"
50
52
  Provides-Extra: testing
51
53
  Requires-Dist: keystone-engine; extra == "testing"
52
54
  Requires-Dist: pypcode~=3.0; extra == "testing"