Fix dotnet/coreclr#9457
authorjashook <jashoo@microsoft.com>
Mon, 13 Mar 2017 23:15:10 +0000 (16:15 -0700)
committerjashook <jashoo@microsoft.com>
Tue, 14 Mar 2017 17:21:23 +0000 (10:21 -0700)
commitb227f0a19dc4fc99341dac863fb05ba872f0cdd3
treec773a851bb5f9c3420e1177ac5ae9805c77c3294
parent650272941f942bd05e177608c7c0b0fbd08aa269
Fix dotnet/coreclr#9457

To optimize code size we only added a UWC_END code if the last code in
uecMem does not equal UWC_END. However, the uec codes are variable sized
and allow any value to follow the code. Therefore, the value has the
small possibility to equal the value of UWC_END (0x4e on arm64
and 0xFF on arm32). Which incorrectly leaves the unwind array
unterminated.

Commit migrated from https://github.com/dotnet/coreclr/commit/43a3f8ed85b210fe5b1a4d56f1b887ad835f2f24
src/coreclr/src/jit/unwind.h
src/coreclr/tests/arm64/Tests.lst