@@ -49,6 +49,65 @@ pub const SIGRTMAX: i32 = 42;
4949/// base address for each evaluation would produce unbounded memory usage.
5050const ADDRS_PER_ANON_GLOBAL : usize = 32 ;
5151
52+ #[ derive( Copy , Clone , Debug , PartialEq ) ]
53+ pub enum AlignmentCheck {
54+ /// Do not check alignment.
55+ None ,
56+ /// Check alignment "symbolically", i.e., using only the requested alignment for an allocation and not its real base address.
57+ Symbolic ,
58+ /// Check alignment on the actual physical integer address.
59+ Int ,
60+ }
61+
62+ #[ derive( Copy , Clone , Debug , PartialEq ) ]
63+ pub enum RejectOpWith {
64+ /// Isolated op is rejected with an abort of the machine.
65+ Abort ,
66+
67+ /// If not Abort, miri returns an error for an isolated op.
68+ /// Following options determine if user should be warned about such error.
69+ /// Do not print warning about rejected isolated op.
70+ NoWarning ,
71+
72+ /// Print a warning about rejected isolated op, with backtrace.
73+ Warning ,
74+
75+ /// Print a warning about rejected isolated op, without backtrace.
76+ WarningWithoutBacktrace ,
77+ }
78+
79+ #[ derive( Copy , Clone , Debug , PartialEq ) ]
80+ pub enum IsolatedOp {
81+ /// Reject an op requiring communication with the host. By
82+ /// default, miri rejects the op with an abort. If not, it returns
83+ /// an error code, and prints a warning about it. Warning levels
84+ /// are controlled by `RejectOpWith` enum.
85+ Reject ( RejectOpWith ) ,
86+
87+ /// Execute op requiring communication with the host, i.e. disable isolation.
88+ Allow ,
89+ }
90+
91+ #[ derive( Debug , Copy , Clone , PartialEq , Eq ) ]
92+ pub enum BacktraceStyle {
93+ /// Prints a terser backtrace which ideally only contains relevant information.
94+ Short ,
95+ /// Prints a backtrace with all possible information.
96+ Full ,
97+ /// Prints only the frame that the error occurs in.
98+ Off ,
99+ }
100+
101+ #[ derive( Debug , Copy , Clone , PartialEq , Eq ) ]
102+ pub enum ValidationMode {
103+ /// Do not perform any kind of validation.
104+ No ,
105+ /// Validate the interior of the value, but not things behind references.
106+ Shallow ,
107+ /// Fully recursively validate references.
108+ Deep ,
109+ }
110+
52111/// Extra data stored with each stack frame
53112pub struct FrameExtra < ' tcx > {
54113 /// Extra data for the Borrow Tracker.
0 commit comments