2018-08-23 19:04:33 +02:00
|
|
|
//! Intrinsics and other functions that the miri engine executes without
|
2019-02-08 14:53:55 +01:00
|
|
|
//! looking at their MIR. Intrinsics/functions supported here are shared by CTFE
|
2018-08-23 19:04:33 +02:00
|
|
|
//! and miri.
|
|
|
|
|
2020-05-25 13:40:01 -07:00
|
|
|
use std::convert::TryFrom;
|
|
|
|
|
2020-03-29 17:19:48 +02:00
|
|
|
use rustc_hir::def_id::DefId;
|
2020-03-29 16:41:09 +02:00
|
|
|
use rustc_middle::mir::{
|
2019-12-22 17:42:04 -05:00
|
|
|
self,
|
2021-01-12 20:12:08 -05:00
|
|
|
interpret::{ConstValue, GlobalId, InterpResult, Scalar},
|
2019-12-22 17:42:04 -05:00
|
|
|
BinOp,
|
|
|
|
};
|
2020-03-29 16:41:09 +02:00
|
|
|
use rustc_middle::ty;
|
2021-08-30 17:38:27 +03:00
|
|
|
use rustc_middle::ty::layout::LayoutOf as _;
|
2020-03-29 16:41:09 +02:00
|
|
|
use rustc_middle::ty::subst::SubstsRef;
|
2020-07-24 13:16:54 +01:00
|
|
|
use rustc_middle::ty::{Ty, TyCtxt};
|
2019-12-31 20:15:40 +03:00
|
|
|
use rustc_span::symbol::{sym, Symbol};
|
2021-08-30 17:38:27 +03:00
|
|
|
use rustc_target::abi::{Abi, Align, Primitive, Size};
|
2018-08-23 19:04:33 +02:00
|
|
|
|
2020-07-24 13:16:54 +01:00
|
|
|
use super::{
|
|
|
|
util::ensure_monomorphic_enough, CheckInAllocMsg, ImmTy, InterpCx, Machine, OpTy, PlaceTy,
|
2021-07-12 18:22:15 +02:00
|
|
|
Pointer,
|
2020-07-24 13:16:54 +01:00
|
|
|
};
|
2018-08-23 19:04:33 +02:00
|
|
|
|
2019-10-24 08:03:57 -07:00
|
|
|
mod caller_location;
|
2019-04-22 13:53:52 +02:00
|
|
|
mod type_name;
|
|
|
|
|
2021-02-21 13:44:16 +01:00
|
|
|
fn numeric_intrinsic<Tag>(name: Symbol, bits: u128, kind: Primitive) -> Scalar<Tag> {
|
2018-08-23 19:04:33 +02:00
|
|
|
let size = match kind {
|
|
|
|
Primitive::Int(integer, _) => integer.size(),
|
|
|
|
_ => bug!("invalid `{}` argument: {:?}", name, bits),
|
|
|
|
};
|
2020-03-21 13:49:02 +01:00
|
|
|
let extra = 128 - u128::from(size.bits());
|
2018-08-23 19:04:33 +02:00
|
|
|
let bits_out = match name {
|
2020-03-21 13:49:02 +01:00
|
|
|
sym::ctpop => u128::from(bits.count_ones()),
|
|
|
|
sym::ctlz => u128::from(bits.leading_zeros()) - extra,
|
|
|
|
sym::cttz => u128::from((bits << extra).trailing_zeros()) - extra,
|
2019-06-14 16:55:36 +03:00
|
|
|
sym::bswap => (bits << extra).swap_bytes(),
|
|
|
|
sym::bitreverse => (bits << extra).reverse_bits(),
|
2018-08-23 19:04:33 +02:00
|
|
|
_ => bug!("not a numeric intrinsic: {}", name),
|
|
|
|
};
|
2021-02-21 13:44:16 +01:00
|
|
|
Scalar::from_uint(bits_out, size)
|
2018-08-23 19:04:33 +02:00
|
|
|
}
|
|
|
|
|
2019-06-07 19:22:42 +02:00
|
|
|
/// The logic for all nullary intrinsics is implemented here. These intrinsics don't get evaluated
|
|
|
|
/// inside an `InterpCx` and instead have their value computed directly from rustc internal info.
|
|
|
|
crate fn eval_nullary_intrinsic<'tcx>(
|
|
|
|
tcx: TyCtxt<'tcx>,
|
|
|
|
param_env: ty::ParamEnv<'tcx>,
|
|
|
|
def_id: DefId,
|
|
|
|
substs: SubstsRef<'tcx>,
|
2020-02-15 11:56:23 +13:00
|
|
|
) -> InterpResult<'tcx, ConstValue<'tcx>> {
|
2019-06-07 19:22:42 +02:00
|
|
|
let tp_ty = substs.type_at(0);
|
2019-06-14 16:55:36 +03:00
|
|
|
let name = tcx.item_name(def_id);
|
2019-06-07 19:22:42 +02:00
|
|
|
Ok(match name {
|
2019-06-14 16:55:36 +03:00
|
|
|
sym::type_name => {
|
2020-07-24 13:16:54 +01:00
|
|
|
ensure_monomorphic_enough(tcx, tp_ty)?;
|
2019-06-07 19:22:42 +02:00
|
|
|
let alloc = type_name::alloc_type_name(tcx, tp_ty);
|
Introduce `ConstAllocation`.
Currently some `Allocation`s are interned, some are not, and it's very
hard to tell at a use point which is which.
This commit introduces `ConstAllocation` for the known-interned ones,
which makes the division much clearer. `ConstAllocation::inner()` is
used to get the underlying `Allocation`.
In some places it's natural to use an `Allocation`, in some it's natural
to use a `ConstAllocation`, and in some places there's no clear choice.
I've tried to make things look as nice as possible, while generally
favouring `ConstAllocation`, which is the type that embodies more
information. This does require quite a few calls to `inner()`.
The commit also tweaks how `PartialOrd` works for `Interned`. The
previous code was too clever by half, building on `T: Ord` to make the
code shorter. That caused problems with deriving `PartialOrd` and `Ord`
for `ConstAllocation`, so I changed it to build on `T: PartialOrd`,
which is slightly more verbose but much more standard and avoided the
problems.
2022-03-02 07:15:04 +11:00
|
|
|
ConstValue::Slice { data: alloc, start: 0, end: alloc.inner().len() }
|
2019-12-22 17:42:04 -05:00
|
|
|
}
|
2021-06-04 00:00:00 +00:00
|
|
|
sym::needs_drop => {
|
|
|
|
ensure_monomorphic_enough(tcx, tp_ty)?;
|
|
|
|
ConstValue::from_bool(tp_ty.needs_drop(tcx, param_env))
|
|
|
|
}
|
2021-09-14 00:00:00 +00:00
|
|
|
sym::pref_align_of => {
|
2021-06-05 00:00:00 +00:00
|
|
|
// Correctly handles non-monomorphic calls, so there is no need for ensure_monomorphic_enough.
|
2019-06-07 19:22:42 +02:00
|
|
|
let layout = tcx.layout_of(param_env.and(tp_ty)).map_err(|e| err_inval!(Layout(e)))?;
|
2021-09-14 00:00:00 +00:00
|
|
|
ConstValue::from_machine_usize(layout.align.pref.bytes(), &tcx)
|
2019-12-22 17:42:04 -05:00
|
|
|
}
|
2020-07-04 18:41:30 +01:00
|
|
|
sym::type_id => {
|
2020-07-24 13:16:54 +01:00
|
|
|
ensure_monomorphic_enough(tcx, tp_ty)?;
|
2020-07-04 18:41:30 +01:00
|
|
|
ConstValue::from_u64(tcx.type_id_hash(tp_ty))
|
|
|
|
}
|
2020-11-20 21:49:49 +08:00
|
|
|
sym::variant_count => match tp_ty.kind() {
|
2021-06-05 00:00:00 +00:00
|
|
|
// Correctly handles non-monomorphic calls, so there is no need for ensure_monomorphic_enough.
|
2022-03-05 07:28:41 +11:00
|
|
|
ty::Adt(ref adt, _) => {
|
|
|
|
ConstValue::from_machine_usize(adt.variants().len() as u64, &tcx)
|
|
|
|
}
|
2020-11-20 21:49:49 +08:00
|
|
|
ty::Projection(_)
|
|
|
|
| ty::Opaque(_, _)
|
|
|
|
| ty::Param(_)
|
|
|
|
| ty::Bound(_, _)
|
|
|
|
| ty::Placeholder(_)
|
|
|
|
| ty::Infer(_) => throw_inval!(TooGeneric),
|
2020-11-21 13:45:59 +08:00
|
|
|
ty::Bool
|
|
|
|
| ty::Char
|
|
|
|
| ty::Int(_)
|
|
|
|
| ty::Uint(_)
|
|
|
|
| ty::Float(_)
|
|
|
|
| ty::Foreign(_)
|
|
|
|
| ty::Str
|
|
|
|
| ty::Array(_, _)
|
|
|
|
| ty::Slice(_)
|
|
|
|
| ty::RawPtr(_)
|
|
|
|
| ty::Ref(_, _, _)
|
|
|
|
| ty::FnDef(_, _)
|
|
|
|
| ty::FnPtr(_)
|
|
|
|
| ty::Dynamic(_, _)
|
|
|
|
| ty::Closure(_, _)
|
|
|
|
| ty::Generator(_, _, _)
|
|
|
|
| ty::GeneratorWitness(_)
|
|
|
|
| ty::Never
|
|
|
|
| ty::Tuple(_)
|
|
|
|
| ty::Error(_) => ConstValue::from_machine_usize(0u64, &tcx),
|
2020-11-20 21:49:49 +08:00
|
|
|
},
|
2019-06-07 19:22:42 +02:00
|
|
|
other => bug!("`{}` is not a zero arg intrinsic", other),
|
|
|
|
})
|
|
|
|
}
|
|
|
|
|
2020-03-16 15:12:42 -07:00
|
|
|
impl<'mir, 'tcx: 'mir, M: Machine<'mir, 'tcx>> InterpCx<'mir, 'tcx, M> {
|
2019-02-08 14:53:55 +01:00
|
|
|
/// Returns `true` if emulation happened.
|
2020-09-12 10:10:13 +02:00
|
|
|
/// Here we implement the intrinsics that are common to all Miri instances; individual machines can add their own
|
|
|
|
/// intrinsic handling.
|
2018-08-23 19:04:33 +02:00
|
|
|
pub fn emulate_intrinsic(
|
|
|
|
&mut self,
|
|
|
|
instance: ty::Instance<'tcx>,
|
2018-09-21 23:32:59 +02:00
|
|
|
args: &[OpTy<'tcx, M::PointerTag>],
|
2021-02-15 00:00:00 +00:00
|
|
|
ret: Option<(&PlaceTy<'tcx, M::PointerTag>, mir::BasicBlock)>,
|
2019-06-07 18:56:27 +02:00
|
|
|
) -> InterpResult<'tcx, bool> {
|
2018-08-23 19:04:33 +02:00
|
|
|
let substs = instance.substs;
|
2019-06-14 16:55:36 +03:00
|
|
|
let intrinsic_name = self.tcx.item_name(instance.def_id());
|
2018-08-23 19:04:33 +02:00
|
|
|
|
2020-03-12 21:22:22 +01:00
|
|
|
// First handle intrinsics without return place.
|
2019-11-25 22:00:58 +01:00
|
|
|
let (dest, ret) = match ret {
|
2019-11-25 22:37:31 +01:00
|
|
|
None => match intrinsic_name {
|
2020-03-12 21:22:22 +01:00
|
|
|
sym::transmute => throw_ub_format!("transmuting to uninhabited type"),
|
2020-12-06 20:25:13 +01:00
|
|
|
sym::abort => M::abort(self, "the program aborted execution".to_owned())?,
|
2020-03-12 21:22:22 +01:00
|
|
|
// Unsupported diverging intrinsic.
|
2019-11-25 22:37:31 +01:00
|
|
|
_ => return Ok(false),
|
2019-12-22 17:42:04 -05:00
|
|
|
},
|
2020-03-12 21:22:22 +01:00
|
|
|
Some(p) => p,
|
2019-04-16 21:04:54 -04:00
|
|
|
};
|
|
|
|
|
2019-06-14 16:55:36 +03:00
|
|
|
// Keep the patterns in this match ordered the same as the list in
|
2020-03-29 15:24:45 +02:00
|
|
|
// `src/librustc_middle/ty/constness.rs`
|
2018-08-23 19:04:33 +02:00
|
|
|
match intrinsic_name {
|
2019-06-14 16:55:36 +03:00
|
|
|
sym::caller_location => {
|
2020-03-30 22:54:15 +02:00
|
|
|
let span = self.find_closest_untracked_caller_location();
|
2019-11-29 11:29:30 +01:00
|
|
|
let location = self.alloc_caller_location_for_span(span);
|
2021-07-12 18:22:15 +02:00
|
|
|
self.write_immediate(location.to_ref(self), dest)?;
|
2019-10-24 08:03:57 -07:00
|
|
|
}
|
|
|
|
|
2020-07-29 14:56:58 -07:00
|
|
|
sym::min_align_of_val | sym::size_of_val => {
|
2020-12-29 22:46:17 +01:00
|
|
|
// Avoid `deref_operand` -- this is not a deref, the ptr does not have to be
|
2021-12-12 00:23:06 +01:00
|
|
|
// dereferenceable!
|
2021-02-15 00:00:00 +00:00
|
|
|
let place = self.ref_to_mplace(&self.read_immediate(&args[0])?)?;
|
2020-07-29 14:56:58 -07:00
|
|
|
let (size, align) = self
|
2021-02-15 00:00:00 +00:00
|
|
|
.size_and_align_of_mplace(&place)?
|
2020-07-29 14:56:58 -07:00
|
|
|
.ok_or_else(|| err_unsup_format!("`extern type` does not have known layout"))?;
|
|
|
|
|
|
|
|
let result = match intrinsic_name {
|
|
|
|
sym::min_align_of_val => align.bytes(),
|
|
|
|
sym::size_of_val => size.bytes(),
|
|
|
|
_ => bug!(),
|
|
|
|
};
|
|
|
|
|
|
|
|
self.write_scalar(Scalar::from_machine_usize(result, self), dest)?;
|
|
|
|
}
|
|
|
|
|
2021-09-07 16:06:07 +01:00
|
|
|
sym::pref_align_of
|
2019-12-22 17:42:04 -05:00
|
|
|
| sym::needs_drop
|
|
|
|
| sym::type_id
|
2020-06-23 16:46:24 +01:00
|
|
|
| sym::type_name
|
|
|
|
| sym::variant_count => {
|
2019-12-22 20:56:01 +01:00
|
|
|
let gid = GlobalId { instance, promoted: None };
|
2020-02-16 11:39:04 +13:00
|
|
|
let ty = match intrinsic_name {
|
2021-09-07 16:06:07 +01:00
|
|
|
sym::pref_align_of | sym::variant_count => self.tcx.types.usize,
|
2020-02-16 11:39:04 +13:00
|
|
|
sym::needs_drop => self.tcx.types.bool,
|
|
|
|
sym::type_id => self.tcx.types.u64,
|
|
|
|
sym::type_name => self.tcx.mk_static_str(),
|
2020-03-30 22:54:15 +02:00
|
|
|
_ => bug!("already checked for nullary intrinsics"),
|
2020-02-16 11:39:04 +13:00
|
|
|
};
|
2020-08-10 12:40:14 +02:00
|
|
|
let val =
|
|
|
|
self.tcx.const_eval_global_id(self.param_env, gid, Some(self.tcx.span))?;
|
2021-03-30 16:08:53 +00:00
|
|
|
let val = self.const_val_to_op(val, ty, Some(dest.layout))?;
|
2021-02-15 00:00:00 +00:00
|
|
|
self.copy_op(&val, dest)?;
|
2019-06-03 14:38:39 -04:00
|
|
|
}
|
|
|
|
|
2019-12-22 17:42:04 -05:00
|
|
|
sym::ctpop
|
2019-06-14 16:55:36 +03:00
|
|
|
| sym::cttz
|
|
|
|
| sym::cttz_nonzero
|
|
|
|
| sym::ctlz
|
|
|
|
| sym::ctlz_nonzero
|
|
|
|
| sym::bswap
|
|
|
|
| sym::bitreverse => {
|
2018-08-23 19:04:33 +02:00
|
|
|
let ty = substs.type_at(0);
|
|
|
|
let layout_of = self.layout_of(ty)?;
|
2021-02-15 00:00:00 +00:00
|
|
|
let val = self.read_scalar(&args[0])?.check_init()?;
|
2021-07-12 18:22:15 +02:00
|
|
|
let bits = val.to_bits(layout_of.size)?;
|
2018-08-23 19:04:33 +02:00
|
|
|
let kind = match layout_of.abi {
|
2021-08-29 11:06:55 +02:00
|
|
|
Abi::Scalar(scalar) => scalar.value,
|
2020-06-21 16:13:31 +02:00
|
|
|
_ => span_bug!(
|
|
|
|
self.cur_span(),
|
|
|
|
"{} called on invalid type {:?}",
|
|
|
|
intrinsic_name,
|
|
|
|
ty
|
|
|
|
),
|
2018-08-23 19:04:33 +02:00
|
|
|
};
|
2019-06-14 16:55:36 +03:00
|
|
|
let (nonzero, intrinsic_name) = match intrinsic_name {
|
|
|
|
sym::cttz_nonzero => (true, sym::cttz),
|
|
|
|
sym::ctlz_nonzero => (true, sym::ctlz),
|
|
|
|
other => (false, other),
|
2018-08-23 19:04:33 +02:00
|
|
|
};
|
2019-06-14 16:55:36 +03:00
|
|
|
if nonzero && bits == 0 {
|
|
|
|
throw_ub_format!("`{}_nonzero` called on 0", intrinsic_name);
|
|
|
|
}
|
2021-02-21 13:44:16 +01:00
|
|
|
let out_val = numeric_intrinsic(intrinsic_name, bits, kind);
|
2018-08-23 19:04:33 +02:00
|
|
|
self.write_scalar(out_val, dest)?;
|
|
|
|
}
|
2020-12-15 00:00:00 +00:00
|
|
|
sym::add_with_overflow | sym::sub_with_overflow | sym::mul_with_overflow => {
|
2021-02-15 00:00:00 +00:00
|
|
|
let lhs = self.read_immediate(&args[0])?;
|
|
|
|
let rhs = self.read_immediate(&args[1])?;
|
2020-12-15 00:00:00 +00:00
|
|
|
let bin_op = match intrinsic_name {
|
|
|
|
sym::add_with_overflow => BinOp::Add,
|
|
|
|
sym::sub_with_overflow => BinOp::Sub,
|
|
|
|
sym::mul_with_overflow => BinOp::Mul,
|
2019-12-22 17:42:04 -05:00
|
|
|
_ => bug!("Already checked for int ops"),
|
2018-09-01 15:05:55 +02:00
|
|
|
};
|
2021-02-15 00:00:00 +00:00
|
|
|
self.binop_with_overflow(bin_op, &lhs, &rhs, dest)?;
|
2018-09-01 15:05:55 +02:00
|
|
|
}
|
2019-06-14 16:55:36 +03:00
|
|
|
sym::saturating_add | sym::saturating_sub => {
|
2021-02-15 00:00:00 +00:00
|
|
|
let l = self.read_immediate(&args[0])?;
|
|
|
|
let r = self.read_immediate(&args[1])?;
|
2022-03-06 19:09:22 -05:00
|
|
|
let val = self.saturating_arith(
|
|
|
|
if intrinsic_name == sym::saturating_add { BinOp::Add } else { BinOp::Sub },
|
2021-02-15 00:00:00 +00:00
|
|
|
&l,
|
|
|
|
&r,
|
|
|
|
)?;
|
2019-02-07 13:12:17 -05:00
|
|
|
self.write_scalar(val, dest)?;
|
2019-02-06 16:15:17 -05:00
|
|
|
}
|
2020-03-08 14:24:32 +01:00
|
|
|
sym::discriminant_value => {
|
2021-02-15 00:00:00 +00:00
|
|
|
let place = self.deref_operand(&args[0])?;
|
|
|
|
let discr_val = self.read_discriminant(&place.into())?.0;
|
2020-04-14 12:49:15 +02:00
|
|
|
self.write_scalar(discr_val, dest)?;
|
2020-03-08 14:24:32 +01:00
|
|
|
}
|
2020-02-04 17:09:22 -08:00
|
|
|
sym::unchecked_shl
|
|
|
|
| sym::unchecked_shr
|
|
|
|
| sym::unchecked_add
|
|
|
|
| sym::unchecked_sub
|
|
|
|
| sym::unchecked_mul
|
|
|
|
| sym::unchecked_div
|
|
|
|
| sym::unchecked_rem => {
|
2021-02-15 00:00:00 +00:00
|
|
|
let l = self.read_immediate(&args[0])?;
|
|
|
|
let r = self.read_immediate(&args[1])?;
|
2018-09-06 13:13:07 +02:00
|
|
|
let bin_op = match intrinsic_name {
|
2019-06-14 16:55:36 +03:00
|
|
|
sym::unchecked_shl => BinOp::Shl,
|
|
|
|
sym::unchecked_shr => BinOp::Shr,
|
2020-02-04 17:09:22 -08:00
|
|
|
sym::unchecked_add => BinOp::Add,
|
|
|
|
sym::unchecked_sub => BinOp::Sub,
|
|
|
|
sym::unchecked_mul => BinOp::Mul,
|
|
|
|
sym::unchecked_div => BinOp::Div,
|
|
|
|
sym::unchecked_rem => BinOp::Rem,
|
2019-12-22 17:42:04 -05:00
|
|
|
_ => bug!("Already checked for int ops"),
|
2018-09-06 13:13:07 +02:00
|
|
|
};
|
2021-02-15 00:00:00 +00:00
|
|
|
let (val, overflowed, _ty) = self.overflowing_binary_op(bin_op, &l, &r)?;
|
2018-09-06 15:11:56 +02:00
|
|
|
if overflowed {
|
|
|
|
let layout = self.layout_of(substs.type_at(0))?;
|
2021-07-12 18:22:15 +02:00
|
|
|
let r_val = r.to_scalar()?.to_bits(layout.size)?;
|
2020-02-04 17:09:22 -08:00
|
|
|
if let sym::unchecked_shl | sym::unchecked_shr = intrinsic_name {
|
2020-03-09 10:17:06 +01:00
|
|
|
throw_ub_format!("overflowing shift by {} in `{}`", r_val, intrinsic_name);
|
2020-02-04 17:09:22 -08:00
|
|
|
} else {
|
2020-03-09 10:17:06 +01:00
|
|
|
throw_ub_format!("overflow executing `{}`", intrinsic_name);
|
2020-02-04 17:09:22 -08:00
|
|
|
}
|
2018-09-06 15:11:56 +02:00
|
|
|
}
|
|
|
|
self.write_scalar(val, dest)?;
|
2018-09-06 13:13:07 +02:00
|
|
|
}
|
2019-06-14 16:55:36 +03:00
|
|
|
sym::rotate_left | sym::rotate_right => {
|
2018-11-03 15:48:29 +01:00
|
|
|
// rotate_left: (X << (S % BW)) | (X >> ((BW - S) % BW))
|
|
|
|
// rotate_right: (X << ((BW - S) % BW)) | (X >> (S % BW))
|
|
|
|
let layout = self.layout_of(substs.type_at(0))?;
|
2021-02-15 00:00:00 +00:00
|
|
|
let val = self.read_scalar(&args[0])?.check_init()?;
|
2021-07-12 18:22:15 +02:00
|
|
|
let val_bits = val.to_bits(layout.size)?;
|
2021-02-15 00:00:00 +00:00
|
|
|
let raw_shift = self.read_scalar(&args[1])?.check_init()?;
|
2021-07-12 18:22:15 +02:00
|
|
|
let raw_shift_bits = raw_shift.to_bits(layout.size)?;
|
2020-03-21 13:49:02 +01:00
|
|
|
let width_bits = u128::from(layout.size.bits());
|
2018-11-03 15:48:29 +01:00
|
|
|
let shift_bits = raw_shift_bits % width_bits;
|
2019-06-02 16:51:51 +00:00
|
|
|
let inv_shift_bits = (width_bits - shift_bits) % width_bits;
|
2019-06-14 16:55:36 +03:00
|
|
|
let result_bits = if intrinsic_name == sym::rotate_left {
|
2018-11-03 15:48:29 +01:00
|
|
|
(val_bits << shift_bits) | (val_bits >> inv_shift_bits)
|
|
|
|
} else {
|
|
|
|
(val_bits >> shift_bits) | (val_bits << inv_shift_bits)
|
|
|
|
};
|
|
|
|
let truncated_bits = self.truncate(result_bits, layout);
|
|
|
|
let result = Scalar::from_uint(truncated_bits, layout.size);
|
|
|
|
self.write_scalar(result, dest)?;
|
|
|
|
}
|
2021-01-23 08:57:04 +00:00
|
|
|
sym::copy => {
|
2021-05-04 13:43:50 +02:00
|
|
|
self.copy_intrinsic(&args[0], &args[1], &args[2], /*nonoverlapping*/ false)?;
|
2020-12-26 02:22:29 +01:00
|
|
|
}
|
2021-11-24 13:05:26 +09:00
|
|
|
sym::write_bytes => {
|
|
|
|
self.write_bytes_intrinsic(&args[0], &args[1], &args[2])?;
|
|
|
|
}
|
2020-04-24 00:17:29 -07:00
|
|
|
sym::offset => {
|
2021-07-12 18:22:15 +02:00
|
|
|
let ptr = self.read_pointer(&args[0])?;
|
2021-02-15 00:00:00 +00:00
|
|
|
let offset_count = self.read_scalar(&args[1])?.to_machine_isize(self)?;
|
2020-04-24 00:17:29 -07:00
|
|
|
let pointee_ty = substs.type_at(0);
|
2019-08-20 17:51:54 +02:00
|
|
|
|
2020-04-24 00:17:29 -07:00
|
|
|
let offset_ptr = self.ptr_offset_inbounds(ptr, pointee_ty, offset_count)?;
|
2021-07-14 22:10:17 +02:00
|
|
|
self.write_pointer(offset_ptr, dest)?;
|
2020-04-24 00:17:29 -07:00
|
|
|
}
|
|
|
|
sym::arith_offset => {
|
2021-07-14 22:10:17 +02:00
|
|
|
let ptr = self.read_pointer(&args[0])?;
|
2021-02-15 00:00:00 +00:00
|
|
|
let offset_count = self.read_scalar(&args[1])?.to_machine_isize(self)?;
|
2020-04-24 00:17:29 -07:00
|
|
|
let pointee_ty = substs.type_at(0);
|
|
|
|
|
|
|
|
let pointee_size = i64::try_from(self.layout_of(pointee_ty)?.size.bytes()).unwrap();
|
|
|
|
let offset_bytes = offset_count.wrapping_mul(pointee_size);
|
2021-07-14 22:10:17 +02:00
|
|
|
let offset_ptr = ptr.wrapping_signed_offset(offset_bytes, self);
|
|
|
|
self.write_pointer(offset_ptr, dest)?;
|
2020-04-24 00:17:29 -07:00
|
|
|
}
|
2019-06-14 16:55:36 +03:00
|
|
|
sym::ptr_offset_from => {
|
2022-03-10 18:30:32 -05:00
|
|
|
let a = self.read_pointer(&args[0])?;
|
|
|
|
let b = self.read_pointer(&args[1])?;
|
2019-11-04 13:24:27 +01:00
|
|
|
|
|
|
|
// Special case: if both scalars are *equal integers*
|
2021-05-02 15:55:22 -06:00
|
|
|
// and not null, we pretend there is an allocation of size 0 right there,
|
|
|
|
// and their offset is 0. (There's never a valid object at null, making it an
|
2019-11-05 10:41:19 +01:00
|
|
|
// exception from the exception.)
|
2019-11-04 13:24:27 +01:00
|
|
|
// This is the dual to the special exception for offset-by-0
|
2022-03-10 18:30:32 -05:00
|
|
|
// in the inbounds pointer offset operation (see `ptr_offset_inbounds` below).
|
|
|
|
match (self.memory.ptr_try_get_alloc(a), self.memory.ptr_try_get_alloc(b)) {
|
|
|
|
(Err(a), Err(b)) if a == b && a != 0 => {
|
|
|
|
// Both are the same non-null integer.
|
2020-03-28 19:29:46 +01:00
|
|
|
self.write_scalar(Scalar::from_machine_isize(0, self), dest)?;
|
2019-12-22 17:42:04 -05:00
|
|
|
}
|
2022-03-10 18:30:32 -05:00
|
|
|
(Err(offset), _) | (_, Err(offset)) => {
|
|
|
|
throw_ub!(DanglingIntPointer(offset, CheckInAllocMsg::OffsetFromTest));
|
|
|
|
}
|
|
|
|
(Ok((a_alloc_id, a_offset, _)), Ok((b_alloc_id, b_offset, _))) => {
|
|
|
|
// Both are pointers. They must be into the same allocation.
|
|
|
|
if a_alloc_id != b_alloc_id {
|
|
|
|
throw_ub_format!(
|
|
|
|
"ptr_offset_from cannot compute offset of pointers into different \
|
|
|
|
allocations.",
|
|
|
|
);
|
|
|
|
}
|
|
|
|
// And they must both be valid for zero-sized accesses ("in-bounds or one past the end").
|
|
|
|
self.memory.check_ptr_access_align(
|
|
|
|
a,
|
|
|
|
Size::ZERO,
|
|
|
|
Align::ONE,
|
|
|
|
CheckInAllocMsg::OffsetFromTest,
|
|
|
|
)?;
|
|
|
|
self.memory.check_ptr_access_align(
|
|
|
|
b,
|
|
|
|
Size::ZERO,
|
|
|
|
Align::ONE,
|
|
|
|
CheckInAllocMsg::OffsetFromTest,
|
|
|
|
)?;
|
2019-11-04 13:24:27 +01:00
|
|
|
|
2022-03-10 18:30:32 -05:00
|
|
|
// Compute offset.
|
|
|
|
let usize_layout = self.layout_of(self.tcx.types.usize)?;
|
|
|
|
let isize_layout = self.layout_of(self.tcx.types.isize)?;
|
|
|
|
let a_offset = ImmTy::from_uint(a_offset.bytes(), usize_layout);
|
|
|
|
let b_offset = ImmTy::from_uint(b_offset.bytes(), usize_layout);
|
|
|
|
let (val, _overflowed, _ty) =
|
|
|
|
self.overflowing_binary_op(BinOp::Sub, &a_offset, &b_offset)?;
|
|
|
|
let pointee_layout = self.layout_of(substs.type_at(0))?;
|
|
|
|
let val = ImmTy::from_scalar(val, isize_layout);
|
|
|
|
let size = ImmTy::from_int(pointee_layout.size.bytes(), isize_layout);
|
|
|
|
self.exact_div(&val, &size, dest)?;
|
2019-11-25 22:00:58 +01:00
|
|
|
}
|
2019-08-20 17:51:54 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2019-06-14 16:55:36 +03:00
|
|
|
sym::transmute => {
|
2021-02-15 00:00:00 +00:00
|
|
|
self.copy_op_transmute(&args[0], dest)?;
|
2018-08-20 19:51:48 +01:00
|
|
|
}
|
2021-11-28 13:00:37 -05:00
|
|
|
sym::assert_inhabited | sym::assert_zero_valid | sym::assert_uninit_valid => {
|
2020-12-02 02:32:10 +01:00
|
|
|
let ty = instance.substs.type_at(0);
|
|
|
|
let layout = self.layout_of(ty)?;
|
|
|
|
|
2021-11-28 13:00:37 -05:00
|
|
|
// For *all* intrinsics we first check `is_uninhabited` to give a more specific
|
|
|
|
// error message.
|
2020-12-02 02:32:10 +01:00
|
|
|
if layout.abi.is_uninhabited() {
|
2020-12-07 18:59:10 +01:00
|
|
|
// The run-time intrinsic panics just to get a good backtrace; here we abort
|
|
|
|
// since there is no problem showing a backtrace even for aborts.
|
2020-12-10 19:42:01 +01:00
|
|
|
M::abort(
|
|
|
|
self,
|
|
|
|
format!(
|
|
|
|
"aborted execution: attempted to instantiate uninhabited type `{}`",
|
|
|
|
ty
|
|
|
|
),
|
|
|
|
)?;
|
2020-12-02 02:32:10 +01:00
|
|
|
}
|
2021-11-28 13:00:37 -05:00
|
|
|
if intrinsic_name == sym::assert_zero_valid
|
|
|
|
&& !layout.might_permit_raw_init(self, /*zero:*/ true)
|
|
|
|
{
|
|
|
|
M::abort(
|
|
|
|
self,
|
|
|
|
format!(
|
|
|
|
"aborted execution: attempted to zero-initialize type `{}`, which is invalid",
|
|
|
|
ty
|
|
|
|
),
|
|
|
|
)?;
|
|
|
|
}
|
|
|
|
if intrinsic_name == sym::assert_uninit_valid
|
|
|
|
&& !layout.might_permit_raw_init(self, /*zero:*/ false)
|
|
|
|
{
|
|
|
|
M::abort(
|
|
|
|
self,
|
|
|
|
format!(
|
|
|
|
"aborted execution: attempted to leave type `{}` uninitialized, which is invalid",
|
|
|
|
ty
|
|
|
|
),
|
|
|
|
)?;
|
|
|
|
}
|
2020-12-02 02:32:10 +01:00
|
|
|
}
|
2019-06-14 16:55:36 +03:00
|
|
|
sym::simd_insert => {
|
2021-02-15 00:00:00 +00:00
|
|
|
let index = u64::from(self.read_scalar(&args[1])?.to_u32()?);
|
|
|
|
let elem = &args[2];
|
2021-11-17 22:29:21 -05:00
|
|
|
let (input, input_len) = self.operand_to_simd(&args[0])?;
|
|
|
|
let (dest, dest_len) = self.place_to_simd(dest)?;
|
|
|
|
assert_eq!(input_len, dest_len, "Return vector length must match input length");
|
2019-09-25 12:54:23 +02:00
|
|
|
assert!(
|
2021-11-17 22:29:21 -05:00
|
|
|
index < dest_len,
|
|
|
|
"Index `{}` must be in bounds of vector with length {}`",
|
2019-12-22 17:42:04 -05:00
|
|
|
index,
|
2021-11-17 22:29:21 -05:00
|
|
|
dest_len
|
2019-09-25 12:54:23 +02:00
|
|
|
);
|
|
|
|
|
2021-11-17 22:29:21 -05:00
|
|
|
for i in 0..dest_len {
|
|
|
|
let place = self.mplace_index(&dest, i)?;
|
|
|
|
let value =
|
|
|
|
if i == index { *elem } else { self.mplace_index(&input, i)?.into() };
|
|
|
|
self.copy_op(&value, &place.into())?;
|
2019-09-24 16:14:43 +02:00
|
|
|
}
|
|
|
|
}
|
2019-06-14 16:55:36 +03:00
|
|
|
sym::simd_extract => {
|
2021-02-15 00:00:00 +00:00
|
|
|
let index = u64::from(self.read_scalar(&args[1])?.to_u32()?);
|
2021-11-17 22:29:21 -05:00
|
|
|
let (input, input_len) = self.operand_to_simd(&args[0])?;
|
2019-09-25 12:54:23 +02:00
|
|
|
assert!(
|
2021-11-17 22:29:21 -05:00
|
|
|
index < input_len,
|
|
|
|
"index `{}` must be in bounds of vector with length `{}`",
|
2019-12-22 17:42:04 -05:00
|
|
|
index,
|
2021-11-17 22:29:21 -05:00
|
|
|
input_len
|
2019-09-25 12:54:23 +02:00
|
|
|
);
|
2021-11-17 22:29:21 -05:00
|
|
|
self.copy_op(&self.mplace_index(&input, index)?.into(), dest)?;
|
2019-09-24 16:14:43 +02:00
|
|
|
}
|
2021-08-10 11:50:33 +01:00
|
|
|
sym::likely | sym::unlikely | sym::black_box => {
|
2020-06-26 13:19:50 +01:00
|
|
|
// These just return their argument
|
2021-02-15 00:00:00 +00:00
|
|
|
self.copy_op(&args[0], dest)?;
|
2020-06-26 13:19:50 +01:00
|
|
|
}
|
2020-09-20 13:30:32 +00:00
|
|
|
sym::assume => {
|
2021-02-15 00:00:00 +00:00
|
|
|
let cond = self.read_scalar(&args[0])?.check_init()?.to_bool()?;
|
2020-09-20 13:30:32 +00:00
|
|
|
if !cond {
|
|
|
|
throw_ub_format!("`assume` intrinsic called with `false`");
|
|
|
|
}
|
|
|
|
}
|
2021-05-30 10:25:41 -07:00
|
|
|
sym::raw_eq => {
|
|
|
|
let result = self.raw_eq_intrinsic(&args[0], &args[1])?;
|
|
|
|
self.write_scalar(result, dest)?;
|
|
|
|
}
|
2018-08-23 19:04:33 +02:00
|
|
|
_ => return Ok(false),
|
|
|
|
}
|
|
|
|
|
2021-02-15 00:00:00 +00:00
|
|
|
trace!("{:?}", self.dump_place(**dest));
|
2019-11-25 22:00:58 +01:00
|
|
|
self.go_to_block(ret);
|
2018-08-23 19:04:33 +02:00
|
|
|
Ok(true)
|
|
|
|
}
|
|
|
|
|
2019-08-20 17:51:54 +02:00
|
|
|
pub fn exact_div(
|
|
|
|
&mut self,
|
2021-02-15 00:00:00 +00:00
|
|
|
a: &ImmTy<'tcx, M::PointerTag>,
|
|
|
|
b: &ImmTy<'tcx, M::PointerTag>,
|
2021-02-15 00:00:00 +00:00
|
|
|
dest: &PlaceTy<'tcx, M::PointerTag>,
|
2019-08-20 17:51:54 +02:00
|
|
|
) -> InterpResult<'tcx> {
|
|
|
|
// Performs an exact division, resulting in undefined behavior where
|
2020-03-04 13:12:04 +01:00
|
|
|
// `x % y != 0` or `y == 0` or `x == T::MIN && y == -1`.
|
2020-02-13 11:16:54 +01:00
|
|
|
// First, check x % y != 0 (or if that computation overflows).
|
2021-02-15 00:00:00 +00:00
|
|
|
let (res, overflow, _ty) = self.overflowing_binary_op(BinOp::Rem, &a, &b)?;
|
2022-03-01 20:02:59 -05:00
|
|
|
assert!(!overflow); // All overflow is UB, so this should never return on overflow.
|
|
|
|
if res.assert_bits(a.layout.size) != 0 {
|
|
|
|
throw_ub_format!("exact_div: {} cannot be divided by {} without remainder", a, b)
|
2019-08-20 17:51:54 +02:00
|
|
|
}
|
2020-02-13 11:16:54 +01:00
|
|
|
// `Rem` says this is all right, so we can let `Div` do its job.
|
2021-02-15 00:00:00 +00:00
|
|
|
self.binop_ignore_overflow(BinOp::Div, &a, &b, dest)
|
2019-08-20 17:51:54 +02:00
|
|
|
}
|
2020-04-24 00:17:29 -07:00
|
|
|
|
2022-03-06 19:09:22 -05:00
|
|
|
pub fn saturating_arith(
|
|
|
|
&self,
|
|
|
|
mir_op: BinOp,
|
|
|
|
l: &ImmTy<'tcx, M::PointerTag>,
|
|
|
|
r: &ImmTy<'tcx, M::PointerTag>,
|
|
|
|
) -> InterpResult<'tcx, Scalar<M::PointerTag>> {
|
|
|
|
assert!(matches!(mir_op, BinOp::Add | BinOp::Sub));
|
|
|
|
let (val, overflowed, _ty) = self.overflowing_binary_op(mir_op, l, r)?;
|
|
|
|
Ok(if overflowed {
|
|
|
|
let size = l.layout.size;
|
|
|
|
let num_bits = size.bits();
|
|
|
|
if l.layout.abi.is_signed() {
|
|
|
|
// For signed ints the saturated value depends on the sign of the first
|
|
|
|
// term since the sign of the second term can be inferred from this and
|
|
|
|
// the fact that the operation has overflowed (if either is 0 no
|
|
|
|
// overflow can occur)
|
|
|
|
let first_term: u128 = l.to_scalar()?.to_bits(l.layout.size)?;
|
|
|
|
let first_term_positive = first_term & (1 << (num_bits - 1)) == 0;
|
|
|
|
if first_term_positive {
|
|
|
|
// Negative overflow not possible since the positive first term
|
|
|
|
// can only increase an (in range) negative term for addition
|
|
|
|
// or corresponding negated positive term for subtraction
|
2022-03-06 19:11:31 -05:00
|
|
|
Scalar::from_int(size.signed_int_max(), size)
|
2022-03-06 19:09:22 -05:00
|
|
|
} else {
|
|
|
|
// Positive overflow not possible for similar reason
|
|
|
|
// max negative
|
2022-03-06 19:11:31 -05:00
|
|
|
Scalar::from_int(size.signed_int_min(), size)
|
2022-03-06 19:09:22 -05:00
|
|
|
}
|
|
|
|
} else {
|
|
|
|
// unsigned
|
|
|
|
if matches!(mir_op, BinOp::Add) {
|
|
|
|
// max unsigned
|
2022-03-06 19:11:31 -05:00
|
|
|
Scalar::from_uint(size.unsigned_int_max(), size)
|
2022-03-06 19:09:22 -05:00
|
|
|
} else {
|
|
|
|
// underflow to 0
|
2022-03-06 19:11:31 -05:00
|
|
|
Scalar::from_uint(0u128, size)
|
2022-03-06 19:09:22 -05:00
|
|
|
}
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
val
|
|
|
|
})
|
|
|
|
}
|
|
|
|
|
2020-04-24 00:17:29 -07:00
|
|
|
/// Offsets a pointer by some multiple of its type, returning an error if the pointer leaves its
|
|
|
|
/// allocation. For integer pointers, we consider each of them their own tiny allocation of size
|
2021-05-02 15:55:22 -06:00
|
|
|
/// 0, so offset-by-0 (and only 0) is okay -- except that null cannot be offset by _any_ value.
|
2020-04-24 00:17:29 -07:00
|
|
|
pub fn ptr_offset_inbounds(
|
|
|
|
&self,
|
2021-07-12 18:22:15 +02:00
|
|
|
ptr: Pointer<Option<M::PointerTag>>,
|
2020-04-24 00:17:29 -07:00
|
|
|
pointee_ty: Ty<'tcx>,
|
|
|
|
offset_count: i64,
|
2021-07-12 18:22:15 +02:00
|
|
|
) -> InterpResult<'tcx, Pointer<Option<M::PointerTag>>> {
|
2020-05-26 02:00:02 -07:00
|
|
|
// We cannot overflow i64 as a type's size must be <= isize::MAX.
|
2020-04-24 00:17:29 -07:00
|
|
|
let pointee_size = i64::try_from(self.layout_of(pointee_ty)?.size.bytes()).unwrap();
|
|
|
|
// The computed offset, in bytes, cannot overflow an isize.
|
2020-05-26 23:14:55 -07:00
|
|
|
let offset_bytes =
|
|
|
|
offset_count.checked_mul(pointee_size).ok_or(err_ub!(PointerArithOverflow))?;
|
2020-04-24 00:17:29 -07:00
|
|
|
// The offset being in bounds cannot rely on "wrapping around" the address space.
|
|
|
|
// So, first rule out overflows in the pointer arithmetic.
|
2021-07-12 18:22:15 +02:00
|
|
|
let offset_ptr = ptr.signed_offset(offset_bytes, self)?;
|
2020-04-24 00:17:29 -07:00
|
|
|
// ptr and offset_ptr must be in bounds of the same allocated object. This means all of the
|
|
|
|
// memory between these pointers must be accessible. Note that we do not require the
|
|
|
|
// pointers to be properly aligned (unlike a read/write operation).
|
|
|
|
let min_ptr = if offset_bytes >= 0 { ptr } else { offset_ptr };
|
2021-01-12 20:12:08 -05:00
|
|
|
let size = offset_bytes.unsigned_abs();
|
2021-05-02 15:55:22 -06:00
|
|
|
// This call handles checking for integer/null pointers.
|
2020-04-24 00:17:29 -07:00
|
|
|
self.memory.check_ptr_access_align(
|
|
|
|
min_ptr,
|
|
|
|
Size::from_bytes(size),
|
2021-05-17 13:08:12 +02:00
|
|
|
Align::ONE,
|
2021-05-06 00:16:27 +02:00
|
|
|
CheckInAllocMsg::PointerArithmeticTest,
|
2020-04-24 00:17:29 -07:00
|
|
|
)?;
|
|
|
|
Ok(offset_ptr)
|
|
|
|
}
|
2021-05-04 13:43:50 +02:00
|
|
|
|
|
|
|
/// Copy `count*size_of::<T>()` many bytes from `*src` to `*dst`.
|
|
|
|
pub(crate) fn copy_intrinsic(
|
|
|
|
&mut self,
|
|
|
|
src: &OpTy<'tcx, <M as Machine<'mir, 'tcx>>::PointerTag>,
|
|
|
|
dst: &OpTy<'tcx, <M as Machine<'mir, 'tcx>>::PointerTag>,
|
|
|
|
count: &OpTy<'tcx, <M as Machine<'mir, 'tcx>>::PointerTag>,
|
|
|
|
nonoverlapping: bool,
|
|
|
|
) -> InterpResult<'tcx> {
|
|
|
|
let count = self.read_scalar(&count)?.to_machine_usize(self)?;
|
|
|
|
let layout = self.layout_of(src.layout.ty.builtin_deref(true).unwrap().ty)?;
|
|
|
|
let (size, align) = (layout.size, layout.align.abi);
|
|
|
|
let size = size.checked_mul(count, self).ok_or_else(|| {
|
|
|
|
err_ub_format!(
|
|
|
|
"overflow computing total size of `{}`",
|
|
|
|
if nonoverlapping { "copy_nonoverlapping" } else { "copy" }
|
|
|
|
)
|
|
|
|
})?;
|
|
|
|
|
2021-07-12 18:22:15 +02:00
|
|
|
let src = self.read_pointer(&src)?;
|
|
|
|
let dst = self.read_pointer(&dst)?;
|
2021-05-04 13:43:50 +02:00
|
|
|
|
2021-05-16 18:53:20 +02:00
|
|
|
self.memory.copy(src, align, dst, align, size, nonoverlapping)
|
2021-05-04 13:43:50 +02:00
|
|
|
}
|
2021-05-30 10:25:41 -07:00
|
|
|
|
2021-11-24 13:05:26 +09:00
|
|
|
pub(crate) fn write_bytes_intrinsic(
|
|
|
|
&mut self,
|
|
|
|
dst: &OpTy<'tcx, <M as Machine<'mir, 'tcx>>::PointerTag>,
|
|
|
|
byte: &OpTy<'tcx, <M as Machine<'mir, 'tcx>>::PointerTag>,
|
|
|
|
count: &OpTy<'tcx, <M as Machine<'mir, 'tcx>>::PointerTag>,
|
|
|
|
) -> InterpResult<'tcx> {
|
|
|
|
let layout = self.layout_of(dst.layout.ty.builtin_deref(true).unwrap().ty)?;
|
|
|
|
|
|
|
|
let dst = self.read_pointer(&dst)?;
|
|
|
|
let byte = self.read_scalar(&byte)?.to_u8()?;
|
|
|
|
let count = self.read_scalar(&count)?.to_machine_usize(self)?;
|
|
|
|
|
|
|
|
let len = layout
|
|
|
|
.size
|
|
|
|
.checked_mul(count, self)
|
|
|
|
.ok_or_else(|| err_ub_format!("overflow computing total size of `write_bytes`"))?;
|
|
|
|
|
|
|
|
let bytes = std::iter::repeat(byte).take(len.bytes_usize());
|
|
|
|
self.memory.write_bytes(dst, bytes)
|
|
|
|
}
|
|
|
|
|
2021-05-30 10:25:41 -07:00
|
|
|
pub(crate) fn raw_eq_intrinsic(
|
|
|
|
&mut self,
|
|
|
|
lhs: &OpTy<'tcx, <M as Machine<'mir, 'tcx>>::PointerTag>,
|
|
|
|
rhs: &OpTy<'tcx, <M as Machine<'mir, 'tcx>>::PointerTag>,
|
|
|
|
) -> InterpResult<'tcx, Scalar<M::PointerTag>> {
|
|
|
|
let layout = self.layout_of(lhs.layout.ty.builtin_deref(true).unwrap().ty)?;
|
2021-05-30 11:31:56 -07:00
|
|
|
assert!(!layout.is_unsized());
|
2021-05-30 10:25:41 -07:00
|
|
|
|
2021-07-12 18:22:15 +02:00
|
|
|
let lhs = self.read_pointer(lhs)?;
|
|
|
|
let rhs = self.read_pointer(rhs)?;
|
2021-05-30 10:25:41 -07:00
|
|
|
let lhs_bytes = self.memory.read_bytes(lhs, layout.size)?;
|
|
|
|
let rhs_bytes = self.memory.read_bytes(rhs, layout.size)?;
|
2021-05-30 11:31:56 -07:00
|
|
|
Ok(Scalar::from_bool(lhs_bytes == rhs_bytes))
|
2021-05-30 10:25:41 -07:00
|
|
|
}
|
2018-08-23 19:04:33 +02:00
|
|
|
}
|