<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 - Use of 'concurrency::parallel_for_each' with the Multi-threaded Debug (/MTd) run-time library causes unhandled exceptions on program exit"
   href="https://bugs.llvm.org/show_bug.cgi?id=34976">34976</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Use of 'concurrency::parallel_for_each' with the Multi-threaded Debug (/MTd) run-time library causes unhandled exceptions on program exit
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>libraries
          </td>
        </tr>

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

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

        <tr>
          <th>OS</th>
          <td>Windows NT
          </td>
        </tr>

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

        <tr>
          <th>Severity</th>
          <td>normal
          </td>
        </tr>

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

        <tr>
          <th>Component</th>
          <td>Support Libraries
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>unassignedbugs@nondot.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>gbreynoo@gmail.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvm-bugs@lists.llvm.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Use of 'parallel_for_each' when compiling with the Visual C++ Compiler uses the
Windows Concurrency Library. We have found that when compiling with /MTd, the
use of 'concurrency::parallel_for_each' can cause unhandled exceptions when the
program is exiting.

This is problematic when debugging or testing.

This issue does not occur when compiling to release or DLL run-time libraries,
and the issue has been raised with Microsoft. However in the meantime we
suggest the removal of this MSVC specific functionality and use the generic
implementation.

To reproduce this issue consistently:
- Create an an executable with calls to 'parallel_for_each'
- Run executable multiple times in parallel
- The exit codes will be as below:
 -1073741819 = C0000005 = Access Violation exception

See attached files for example</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>