From 12bf8df68845b8c539cb8b4c4c4498d248135ba3 Mon Sep 17 00:00:00 2001 From: Igor Klopov Date: Fri, 3 Nov 2017 01:51:29 +0300 Subject: [PATCH] consider modules 59 as node9 --- lib/system.js | 1 + lib/verify.js | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/system.js b/lib/system.js index c97e0e59..e517fcd9 100644 --- a/lib/system.js +++ b/lib/system.js @@ -12,6 +12,7 @@ export function abiToNodeRange (abi) { if (/^m?48/.test(abi)) return 'node6'; if (/^m?51/.test(abi)) return 'node7'; if (/^m?57/.test(abi)) return 'node8'; + if (/^m?59/.test(abi)) return 'node9'; return abi; } diff --git a/lib/verify.js b/lib/verify.js index 11a1c349..e60288f5 100644 --- a/lib/verify.js +++ b/lib/verify.js @@ -26,6 +26,9 @@ const script = ` } else { kCpuFeaturesOffset = 0x10; } + } else + if (modules === 59) { + kCpuFeaturesOffset = 0x0c; } else { assert(false, modules); } @@ -45,7 +48,7 @@ const script = ` if (modules === 14) { } else if (modules === 46 || modules === 48 || - modules === 51 || modules === 57) { + modules === 51 || modules === 57 || modules === 59) { var paddedPayloadOffset = 0x48; // see SerializedCodeData::Payload() var index = paddedPayloadOffset + 10; cd[index] ^= 0xf0;