Don't abort const eval due to long running evals, just warn
This commit is contained in:
parent
99d4886ead
commit
4f6d118048
6 changed files with 9 additions and 18 deletions
|
|
@ -550,7 +550,6 @@ for ::mir::interpret::EvalError<'gcx> {
|
|||
InvalidPointerMath |
|
||||
ReadUndefBytes |
|
||||
DeadLocal |
|
||||
ExecutionTimeLimitReached |
|
||||
StackFrameLimitReached |
|
||||
OutOfTls |
|
||||
TlsOutOfBounds |
|
||||
|
|
|
|||
|
|
@ -65,7 +65,6 @@ pub enum EvalErrorKind<'tcx> {
|
|||
Intrinsic(String),
|
||||
OverflowingMath,
|
||||
InvalidChar(u128),
|
||||
ExecutionTimeLimitReached,
|
||||
StackFrameLimitReached,
|
||||
OutOfTls,
|
||||
TlsOutOfBounds,
|
||||
|
|
@ -188,8 +187,6 @@ impl<'tcx> Error for EvalError<'tcx> {
|
|||
"mir not found",
|
||||
InvalidChar(..) =>
|
||||
"tried to interpret an invalid 32-bit value as a char",
|
||||
ExecutionTimeLimitReached =>
|
||||
"the expression was too complex to be evaluated or resulted in an infinite loop",
|
||||
StackFrameLimitReached =>
|
||||
"reached the configured maximum number of stack frames",
|
||||
OutOfTls =>
|
||||
|
|
|
|||
|
|
@ -112,8 +112,6 @@ pub struct Session {
|
|||
|
||||
/// The maximum number of stackframes allowed in const eval
|
||||
pub const_eval_stack_frame_limit: usize,
|
||||
/// The maximum number miri steps per constant
|
||||
pub const_eval_step_limit: usize,
|
||||
|
||||
/// The metadata::creader module may inject an allocator/panic_runtime
|
||||
/// dependency if it didn't already find one, and this tracks what was
|
||||
|
|
@ -1103,7 +1101,6 @@ pub fn build_session_(
|
|||
recursion_limit: Once::new(),
|
||||
type_length_limit: Once::new(),
|
||||
const_eval_stack_frame_limit: 100,
|
||||
const_eval_step_limit: 1_000_000,
|
||||
next_node_id: OneThread::new(Cell::new(NodeId::new(1))),
|
||||
injected_allocator: Once::new(),
|
||||
allocator_kind: Once::new(),
|
||||
|
|
|
|||
|
|
@ -509,7 +509,6 @@ impl<'a, 'tcx> Lift<'tcx> for interpret::EvalError<'a> {
|
|||
Intrinsic(ref s) => Intrinsic(s.clone()),
|
||||
OverflowingMath => OverflowingMath,
|
||||
InvalidChar(c) => InvalidChar(c),
|
||||
ExecutionTimeLimitReached => ExecutionTimeLimitReached,
|
||||
StackFrameLimitReached => StackFrameLimitReached,
|
||||
OutOfTls => OutOfTls,
|
||||
TlsOutOfBounds => TlsOutOfBounds,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue