<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <div class="moz-cite-prefix">Petter,<br>
      <br>
      Added superBasic to enum.  Does not seem to alter anything.  I
      have fixed a few other things in CoinUtils.<br>
      <br>
      I am looking at divides by zero etc in cut generators.  I am also
      looking at CglGomory to try and fix things for Tobias.  On my runs
      there were no problems but I am not happy with my coding.  So I am
      testing using CoinRational as that way it will be easier for
      people to stress that.  I don't think CoinRational had ever been
      used as it had serious bugs - which I think I have fixed.<br>
      <br>
      I will update Cgl when I have finished my tests.  The divide by
      zeros don't seem to be fatal, but they do change behaviour.<br>
      <br>
      John Forrest <br>
      <br>
      <br>
      On 21/10/17 16:09, Petter Strandmark wrote:<br>
    </div>
    <blockquote type="cite"
cite="mid:CAOet6XfLK9o7dT2kAkawRqP+gZdCd4pmfDY30nt3_-OieFi=1A@mail.gmail.com">
      <meta http-equiv="Context-Type" content="text/html; charset=UTF-8">
      <div dir="ltr">I am compiling and running Cbc with
        Clang’s UndefinedBehaviorSanitizer. I have been able to fix
        several errors, but a more tricky one is the following. This
        line sometimes incorrecly casts an enum:
        <div><a
href="https://github.com/coin-or/Osi/blob/master/Osi/src/Osi/OsiPresolve.cpp#L505"
            moz-do-not-send="true"><br>
          </a></div>
        <div><a
href="https://github.com/coin-or/Osi/blob/master/Osi/src/Osi/OsiPresolve.cpp#L505"
            moz-do-not-send="true">https://github.com/coin-or/Osi/blob/master/Osi/src/Osi/OsiPresolve.cpp#L505</a><br>
        </div>
        <div><br>
        </div>
        <div>The original enum looks like:</div>
        <div>
          <div>  /*! \brief Enum for status of various sorts</div>
          <div>  </div>
          <div>    Matches CoinWarmStartBasis::Status and adds
            superBasic. Most code that</div>
          <div>    converts between CoinPrePostsolveMatrix::Status and</div>
          <div>    CoinWarmStartBasis::Status will break if this
            correspondence is broken.</div>
          <div><br>
          </div>
          <div>    superBasic is an unresolved problem: there's no
            analogue in</div>
          <div>    CoinWarmStartBasis::Status.</div>
          <div>  */</div>
          <div>  enum Status {</div>
          <div>    isFree = 0x00,</div>
          <div>    basic = 0x01,</div>
          <div>    atUpperBound = 0x02,</div>
          <div>    atLowerBound = 0x03,</div>
          <div>    superBasic = 0x04</div>
          <div>  };</div>
        </div>
        <div><br>
        </div>
        <div>and the target enum looks like:</div>
        <div><br>
        </div>
        <div>
          <div>  enum Status {</div>
          <div>    isFree = 0x00,<span> </span>///< Nonbasic free
            variable</div>
          <div>    basic = 0x01,<span> </span>///< Basic variable</div>
          <div>    atUpperBound = 0x02,<span> </span>///< Nonbasic
            at upper bound</div>
          <div>    atLowerBound = 0x03<span> </span>///< Nonbasic at
            lower bound</div>
          <div>  };</div>
        </div>
        <div><br>
        </div>
        <div>UndefinedBehaviorSanitizer stops the execution because the
          status is superBasic. <br>
        </div>
        <div><br>
        </div>
        <div>The question is, what is the correct course of action in
          that case?</div>
        <div><br>
        </div>
        <div>Petter</div>
        <div><br>
        </div>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
Cbc mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Cbc@list.coin-or.org">Cbc@list.coin-or.org</a>
<a class="moz-txt-link-freetext" href="https://list.coin-or.org/mailman/listinfo/cbc">https://list.coin-or.org/mailman/listinfo/cbc</a>
</pre>
    </blockquote>
    <p><br>
    </p>
  </body>
</html>