Commit 043fcd5
[release/10.0] Fix ProfileEnter when called on a foreign thread (#119349)
* Fix ProfileEnter when called on a foreign thread
When ProfileEnter is called on a foreign thread that the runtime has not
seen yet, which can happen for UnmanagedCallersOnly marked methods,
it crashes in the GCX_COOP_THREAD_EXISTS(GET_THREAD()); That was left in
by accident in my change I've made a long time ago and should not be
there.
This change removes that switch, we switch to cooperative mode later in
the ProfileEnter and setup the thread for runtime before that.
Close #115617
* Make ProfileLeave look the same
---------
Co-authored-by: Jan Vorlicek <janvorli@microsoft.com>1 parent c2afc88 commit 043fcd5
1 file changed
+4
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10666 | 10666 | | |
10667 | 10667 | | |
10668 | 10668 | | |
10669 | | - | |
10670 | | - | |
10671 | | - | |
| 10669 | + | |
10672 | 10670 | | |
10673 | 10671 | | |
10674 | 10672 | | |
| |||
10844 | 10842 | | |
10845 | 10843 | | |
10846 | 10844 | | |
10847 | | - | |
10848 | | - | |
10849 | | - | |
| 10845 | + | |
10850 | 10846 | | |
10851 | 10847 | | |
10852 | 10848 | | |
| 10849 | + | |
| 10850 | + | |
10853 | 10851 | | |
10854 | 10852 | | |
10855 | 10853 | | |
| |||
0 commit comments