angr.storage.memory_mixins.javavm_memory_mixin

class angr.storage.memory_mixins.javavm_memory_mixin.JavaVmMemoryMixin

Bases: MemoryMixin

A memory mixin for JavaVM memory.

__init__(memory_id='mem', stack=None, heap=None, vm_static_table=None, load_strategies=None, store_strategies=None, max_array_size=1000, **kwargs)
static get_new_uuid()

Generate a unique id within the scope of the JavaVM memory. This, for example, is used for distinguishing memory objects of the same type (e.g. multiple instances of the same class).

store(addr, data, frame=0)
load(addr, frame=0, none_if_missing=False)
push_stack_frame()
pop_stack_frame()
property stack
store_array_element(array, idx, value)
store_array_elements(array, start_idx, data)

Stores either a single element or a range of elements in the array.

Parameters:
  • array – Reference to the array.

  • start_idx – Starting index for the store.

  • data – Either a single value or a list of values.

load_array_element(array, idx)
load_array_elements(array, start_idx, no_of_elements)

Loads either a single element or a range of elements from the array.

Parameters:
  • array – Reference to the array.

  • start_idx – Starting index for the load.

  • no_of_elements – Number of elements to load.

concretize_store_idx(idx, strategies=None)

Concretizes a store index.

Parameters:
  • idx – An expression for the index.

  • strategies – A list of concretization strategies (to override the default).

  • min_idx – Minimum value for a concretized index (inclusive).

  • max_idx – Maximum value for a concretized index (exclusive).

Returns:

A list of concrete indexes.

concretize_load_idx(idx, strategies=None)

Concretizes a load index.

Parameters:
  • idx – An expression for the index.

  • strategies – A list of concretization strategies (to override the default).

  • min_idx – Minimum value for a concretized index (inclusive).

  • max_idx – Maximum value for a concretized index (exclusive).

Returns:

A list of concrete indexes.