Sporadic AccessViolationException creating a thread using CreateThread
#38654
Labels
area-Interop-coreclr
question
Answer questions and provide assistance, not an issue with source code or documentation.
Description
<< More likely just a question and not a bug report >>
Is there a known problem that could cause memory corruptions when calling
CreateThread
directly to create a thread (and passing a manaaged method as its ThreadProc) in a managed process?--
When attempting to add P/Invoke sigs for
CreateThread
and allied functions (dotnet/pinvoke#463), I observed that my tests failed in the PR builds withAccessViolationException
.Initially I couldn't reproduce the problem locally, but with effort (i.e., with some modifications to the tests etc.) I was able to repro the problem locally as well in my own separate CI builds.
I've only ever seen the problem repro under netfx TFM's. I've never been able to reproduce it under netstandard or netcoreapp TFM's. Another point of interest - if the threads are created suspended and never resumed, then all is well (no AV's, ever).
Configuration
The text was updated successfully, but these errors were encountered: