[llvm-bugs] [Bug 32585] New: llvm-stress hangs

via llvm-bugs llvm-bugs at lists.llvm.org
Sun Apr 9 13:48:56 PDT 2017


            Bug ID: 32585
           Summary: llvm-stress hangs
           Product: new-bugs
           Version: trunk
          Hardware: Macintosh
                OS: MacOS X
            Status: NEW
          Severity: normal
          Priority: P
         Component: new bugs
          Assignee: unassignedbugs at nondot.org
          Reporter: jbush342 at gmail.com
                CC: llvm-bugs at lists.llvm.org

When I try this on MacOS:

  llvm-stress -seed=1659519802 -size=700

The program hangs. It appears a bug was introduced in change 295325.
Specifically, operator()() returns a 32 bit number, but it's not supposed to
return anything larger than max(), which is 0x7ffff:

  uint32_t operator()() { return Rand32(); }
  static constexpr result_type min() { return 0; }
  static constexpr result_type max() { return 0x7ffff; }

Changing it to this:

  uint32_t operator()() { return Rand32() % max(); }

Causes it to work properly.

You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20170409/92a75175/attachment.html>

More information about the llvm-bugs mailing list