Quuxplusone / LLVMBugzillaTest

0 stars 0 forks source link

Use of 'concurrency::parallel_for_each' with the Multi-threaded Debug (/MTd) run-time library causes unhandled exceptions on program exit #33949

Open Quuxplusone opened 7 years ago

Quuxplusone commented 7 years ago
Bugzilla Link PR34976
Status NEW
Importance P normal
Reported by Owen Reynolds (gbreynoo@gmail.com)
Reported on 2017-10-17 06:31:54 -0700
Last modified on 2018-02-16 01:00:51 -0800
Version trunk
Hardware PC Windows NT
CC grimar@accesssoftek.com, llvm-bugs@lists.llvm.org
Fixed by commit(s)
Attachments main.cpp (948 bytes, text/plain)
build_main.bat (446 bytes, text/plain)
create_issue.bat (93 bytes, text/plain)
issue_run.bat (108 bytes, text/plain)
Blocks
Blocked by
See also
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
Quuxplusone commented 7 years ago

Attached main.cpp (948 bytes, text/plain): Example cpp file

Quuxplusone commented 7 years ago

Attached build_main.bat (446 bytes, text/plain): Example Compilation Command Line

Quuxplusone commented 7 years ago

Attached create_issue.bat (93 bytes, text/plain): Example used for reproducible

Quuxplusone commented 7 years ago

Attached issue_run.bat (108 bytes, text/plain): Second example used for reproducible

Quuxplusone commented 6 years ago

Due to a change in Microsoft's issue reporting system, the problem has been resubmitted:

https://developercommunity.visualstudio.com/content/problem/198027/use-of-concurrencyparallel-for-each-with-the-multi.html