Documentation

Miri.Interpreter.IntegerOps

Integer branches of pinned rustc_const_eval interpret/operator.rs. Layout acquisition and scalar extraction are separate interpreter operations. These entry points take their checked scalar payload and integer layout; they do not assert that an arbitrary MIR operand has either property.

Equations
Instances For
    Equations
    • One or more equations did not get rendered due to their size.
    Instances For
      Equations
      Instances For
        Equations
        Instances For
          Equations
          • One or more equations did not get rendered due to their size.
          Instances For
            Instances For
              Equations
              Instances For
                Equations
                • One or more equations did not get rendered due to their size.
                Instances For
                  Instances For
                    Equations
                    Instances For
                      Equations
                      • One or more equations did not get rendered due to their size.
                      Instances For
                        Instances For
                          Equations
                          Instances For
                            Equations
                            • One or more equations did not get rendered due to their size.
                            Instances For
                              Equations
                              Instances For
                                Equations
                                • One or more equations did not get rendered due to their size.
                                Instances For

                                  Size-checked extraction using the source layout's signedness.

                                  Equations
                                  • One or more equations did not get rendered due to their size.
                                  Instances For
                                    Equations
                                    • One or more equations did not get rendered due to their size.
                                    Instances For
                                      Equations
                                      • One or more equations did not get rendered due to their size.
                                      Instances For

                                        Source compute_size_in_bytes checks u64 multiplication and an inclusive max_size_of_val, which differs from Size.checkedMul's object-size bound.

                                        Equations
                                        • One or more equations did not get rendered due to their size.
                                        Instances For

                                          Once operand extraction and type agreement have succeeded, division by zero is always UB; wrapping arithmetic never turns it into a successful result.

                                          theorem Miri.Interpreter.IntegerOps.division_success_nonzero (left right : IntegerValue) (l r : Int) (hl : decode left = Except.ok l) (hr : decode right = Except.ok r) (ht : left.type = right.type) (value : IntegerResult) (success : binary MIR.BinOp.Div left right = Except.ok value) :
                                          r ≠ 0