Ignore register unwinder callback for empty patch_info data table on Windows. (#33726)
authorJohan Lorensson <lateralusx.github@gmail.com>
Thu, 19 Mar 2020 10:01:53 +0000 (11:01 +0100)
committerGitHub <noreply@github.com>
Thu, 19 Mar 2020 10:01:53 +0000 (11:01 +0100)
commitcd09cd3999b862360f4f9811f243a2baabb330f9
tree2032e54364cdd69958ed9c3ddfadb6c60225aa3b
parent1410194ee93ec480f40a7ece47548b30cf558010
Ignore register unwinder callback for empty patch_info data table on Windows. (#33726)

Running System.Runtime.Serialization.Xml test suite triggers calls to
mono_code_manager_reserve with 0 size code block. On Windows, allocating
code regions from code manager will also add callback for code region
into unwinder function table, but since region could be 0 length,
it will be causing a crash in RtlInstallFunctionTableCallback OS call.

Fix hardens code to not try to register callbacks for code regions
of size 0, since that is considered a critical error by Windows OS API.
src/mono/mono/mini/exceptions-amd64.c