[w32handle] Initialize them earlier
commite5a4d23fc7d431ddb61ad271a5b1e6ad28612104
authorLudovic Henry <ludovic@xamarin.com>
Wed, 24 Aug 2016 10:09:08 +0000 (24 12:09 +0200)
committerLudovic Henry <ludovic@xamarin.com>
Wed, 24 Aug 2016 14:39:15 +0000 (24 16:39 +0200)
tree309175e87b03221cdffb0d70d270f10e3fb81e03
parent208650e6da9ff8ffa3a4ee7a591c4e4fa5b48b62
[w32handle] Initialize them earlier

If we happen to have the debugger or the log profiler enabled, we would run into a use before initialization case for the w32handle. The debugger or profiler would call `mono_gc_base_init` which would attach the current thread, and that would crash in `mono_w32handle_new` at w32handle.c:437 with `scan_mutex` being an invalid value (EINVAL).
mono/metadata/domain.c
mono/mini/driver.c
mono/mini/mini-runtime.c
mono/utils/w32handle.c