Fix an assert in checked-build GC mode
commit98dbaf2bdee7392d65a5fe3a42f149f2c3db1647
authorAndi McClure <andi.mcclure@xamarin.com>
Tue, 8 Mar 2016 21:44:49 +0000 (8 16:44 -0500)
committerAndi McClure <andi.mcclure@xamarin.com>
Tue, 8 Mar 2016 21:44:49 +0000 (8 16:44 -0500)
treeaecf6d6274b1d483306bc687e2dfc00e2f1d3238
parent9665e4dd6e2ea0afbb2a5d6df46b14bb6b81bdea
Fix an assert in checked-build GC mode

The pinvoke implementation in the failure case was creating a managed
exception object while in blocking mode, a rules violation. This patch
puts a redundant lookup early so that any exceptions occur before
blocking mode is entered. (The "real" lookup is unchanged because the
current pattern is optimized well by the JIT.)
mono/metadata/marshal.c