diff --git a/ports/xed/dont_call_evex_scan_when_error.patch b/ports/xed/dont_call_evex_scan_when_error.patch new file mode 100644 index 00000000..820e5a57 --- /dev/null +++ b/ports/xed/dont_call_evex_scan_when_error.patch @@ -0,0 +1,13 @@ +diff --git a/src/dec/xed-ild.c b/src/dec/xed-ild.c +index 1960b4e..6ba91cd 100644 +--- a/src/dec/xed-ild.c ++++ b/src/dec/xed-ild.c +@@ -1447,7 +1447,7 @@ xed_instruction_length_decode(xed_decoded_inst_t* ild) + #if defined(XED_SUPPORTS_AVX512) || defined(XED_SUPPORTS_KNC) + + // evex scanner assumes it can read bytes so we must check for limit first. +- if (xed3_operand_get_out_of_bytes(ild)) ++ if (xed3_operand_get_out_of_bytes(ild) || xed3_operand_get_error(ild)) + return; + + // if we got a vex prefix (which also sucks down the opcode), diff --git a/ports/xed/portfile.cmake b/ports/xed/portfile.cmake index 9f19f141..4b261bb6 100644 --- a/ports/xed/portfile.cmake +++ b/ports/xed/portfile.cmake @@ -4,6 +4,8 @@ vcpkg_from_github( REF 5976632eeaaaad7890c2109d0cfaf4012eaca3b8 # 12.0.1 SHA512 9463e669cc273f55829e82d6032763221c2ba73f3c43191be847f694f6fd3609b866cc14101e8b1f88e7e44f04b4f5f7bf61bb9431b72b7e17ded1db34b7757d HEAD_REF master + PATCHES + dont_call_evex_scan_when_error.patch ) # Last checked Dec 9, 2020