(self, start, end, base_state=None)
return True
Check whether the given memory region is extremely sparse, i.e., all bytes are the same value.

        :param int start: The beginning of the region.
        :param int end:   The end of the region (exclusive).
        :param base_state: The base state (optional).
        :return:           True if the region is extremely sparse, False otherwise.
        :rtype:            bool
Check whether the given memory region is extremely sparse, i.e., all bytes are the same value.
Check whether the given memory region is extremely sparse i . e . all bytes are the same value .
def _is_region_extremely_sparse(self, start, end, base_state=None):
        """
        Check whether the given memory region is extremely sparse, i.e., all bytes are the same value.

        :param int start: The beginning of the region.
        :param int end:   The end of the region (exclusive).
        :param base_state: The base state (optional).
        :return:           True if the region is extremely sparse, False otherwise.
        :rtype:            bool
        """

        all_bytes = None

        if base_state is not None:
            all_bytes = base_state.memory.load(start, end - start)
            try:
                all_bytes = base_state.solver.eval(all_bytes, cast_to=bytes)
            except SimError:
                all_bytes = None

        size = end - start

        if all_bytes is None:
            # load from the binary
            all_bytes = self._fast_memory_load_bytes(start, size)

        if all_bytes is None:
            return True

        if len(all_bytes) < size:
            l.warning("_is_region_extremely_sparse: The given region %#x-%#x is not a continuous memory region in the "
                      "memory space. Only the first %d bytes (%#x-%#x) are processed.", start, end, len(all_bytes),
                      start, start + len(all_bytes))

        the_byte_value = None
        for b in all_bytes:
            if the_byte_value is None:
                the_byte_value = b
            else:
                if the_byte_value != b:
                    return False

        return True
def _is_region_extremely_sparse ( self , start , end , base_state = None ) : all_bytes = None if base_state is not None : all_bytes = base_state . memory . load ( start , end - start ) try : all_bytes = base_state . solver . eval ( all_bytes , cast_to = bytes ) except SimError : all_bytes = None size = end - start if all_bytes is None : # load from the binary all_bytes = self . _fast_memory_load_bytes ( start , size ) if all_bytes is None : return True if len ( all_bytes ) < size : l . warning ( "_is_region_extremely_sparse: The given region %#x-%#x is not a continuous memory region in the " "memory space. Only the first %d bytes (%#x-%#x) are processed." , start , end , len ( all_bytes ) , start , start + len ( all_bytes ) ) the_byte_value = None for b in all_bytes : if the_byte_value is None : the_byte_value = b else : if the_byte_value != b : return False return True