<html>
    <head>
      <base href="https://bugs.llvm.org/">
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - RangeConstraintManager areFeasible(Constraints) false, assertion failure"
   href="https://bugs.llvm.org/show_bug.cgi?id=49642">49642</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>RangeConstraintManager areFeasible(Constraints) false, assertion failure
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>clang
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>trunk
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>PC
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>All
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>enhancement
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>Static Analyzer
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>dcoughlin@apple.com
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>balazs.benics@sigmatechnology.se
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>dcoughlin@apple.com, llvm-bugs@lists.llvm.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>There was a similar bug <a class="bz_bug_link 
          bz_status_RESOLVED  bz_closed"
   title="RESOLVED FIXED - RangeConstraintManager infeasible execution path due to EquivalenceClasses"
   href="show_bug.cgi?id=49490">https://bugs.llvm.org/show_bug.cgi?id=49490</a>, which was
fixed by D98341.
Fortunately, that introduced an assertion, which was triggered by the following
code.
Maybe the related revision did not fix the root cause of this bug?

test.c:
```lang=c
typedef ssize_t;
b;

unsigned c;
int write(int, const void *, unsigned long);

a() {
  d();
  while (c > 0) {
    b = write(0, d, c);
    if (b)
      c -= b;
    b < 1;
  }
  if (c && c) {
    //     ^ crash
  }
}
```

clang --analyze -Xclang -analyzer-checker=core test.c

The bug originally was found by analyzing the Twin project and reduced using
reduce.</pre>
        </div>
      </p>


      <hr>
      <span>You are receiving this mail because:</span>

      <ul>
          <li>You are on the CC list for the bug.</li>
      </ul>
    </body>
</html>