Rollup merge of #64541 - RalfJung:miri-errors, r=oli-obk
document Miri error categories r? @oli-obk
This commit is contained in:
commit
f8b6e26cfb
1 changed files with 14 additions and 1 deletions
|
@ -322,6 +322,9 @@ impl<O: fmt::Debug> fmt::Debug for PanicInfo<O> {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Error information for when the program we executed turned out not to actually be a valid
|
||||||
|
/// program. This cannot happen in stand-alone Miri, but it can happen during CTFE/ConstProp
|
||||||
|
/// where we work on generic code or execution does not have all information available.
|
||||||
#[derive(Clone, RustcEncodable, RustcDecodable, HashStable)]
|
#[derive(Clone, RustcEncodable, RustcDecodable, HashStable)]
|
||||||
pub enum InvalidProgramInfo<'tcx> {
|
pub enum InvalidProgramInfo<'tcx> {
|
||||||
/// Resolution can fail if we are in a too generic context.
|
/// Resolution can fail if we are in a too generic context.
|
||||||
|
@ -351,6 +354,7 @@ impl fmt::Debug for InvalidProgramInfo<'tcx> {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Error information for when the program caused Undefined Behavior.
|
||||||
#[derive(Clone, RustcEncodable, RustcDecodable, HashStable)]
|
#[derive(Clone, RustcEncodable, RustcDecodable, HashStable)]
|
||||||
pub enum UndefinedBehaviorInfo {
|
pub enum UndefinedBehaviorInfo {
|
||||||
/// Free-form case. Only for errors that are never caught!
|
/// Free-form case. Only for errors that are never caught!
|
||||||
|
@ -373,12 +377,19 @@ impl fmt::Debug for UndefinedBehaviorInfo {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Error information for when the program did something that might (or might not) be correct
|
||||||
|
/// to do according to the Rust spec, but due to limitations in the interpreter, the
|
||||||
|
/// operation could not be carried out. These limitations can differ between CTFE and the
|
||||||
|
/// Miri engine, e.g., CTFE does not support casting pointers to "real" integers.
|
||||||
|
///
|
||||||
|
/// Currently, we also use this as fall-back error kind for errors that have not been
|
||||||
|
/// categorized yet.
|
||||||
#[derive(Clone, RustcEncodable, RustcDecodable, HashStable)]
|
#[derive(Clone, RustcEncodable, RustcDecodable, HashStable)]
|
||||||
pub enum UnsupportedOpInfo<'tcx> {
|
pub enum UnsupportedOpInfo<'tcx> {
|
||||||
/// Free-form case. Only for errors that are never caught!
|
/// Free-form case. Only for errors that are never caught!
|
||||||
Unsupported(String),
|
Unsupported(String),
|
||||||
|
|
||||||
// -- Everything below is not classified yet --
|
// -- Everything below is not categorized yet --
|
||||||
FunctionAbiMismatch(Abi, Abi),
|
FunctionAbiMismatch(Abi, Abi),
|
||||||
FunctionArgMismatch(Ty<'tcx>, Ty<'tcx>),
|
FunctionArgMismatch(Ty<'tcx>, Ty<'tcx>),
|
||||||
FunctionRetMismatch(Ty<'tcx>, Ty<'tcx>),
|
FunctionRetMismatch(Ty<'tcx>, Ty<'tcx>),
|
||||||
|
@ -545,6 +556,8 @@ impl fmt::Debug for UnsupportedOpInfo<'tcx> {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Error information for when the program exhausted the resources granted to it
|
||||||
|
/// by the interpreter.
|
||||||
#[derive(Clone, RustcEncodable, RustcDecodable, HashStable)]
|
#[derive(Clone, RustcEncodable, RustcDecodable, HashStable)]
|
||||||
pub enum ResourceExhaustionInfo {
|
pub enum ResourceExhaustionInfo {
|
||||||
/// The stack grew too big.
|
/// The stack grew too big.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue