From bd0e41aebc72aad21254742741b17974c69dc37f Mon Sep 17 00:00:00 2001 From: Gireesh Punathil Date: Fri, 5 May 2017 07:25:36 -0400 Subject: [PATCH] test: detect all types of aborts in windows On Windows, 'aborts' are of 2 types, depending on the context: (i) Forced access violation, if --abort-on-uncaught-exception is on which corresponds to exit code 3221225477 (0xC0000005) (ii) raise(SIGABRT) or abort(), which lands up in CRT library calls which corresponds to exit code 3 --- test/common/index.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/test/common/index.js b/test/common/index.js index 3b707a93baa99d..aa4a381ae334b0 100644 --- a/test/common/index.js +++ b/test/common/index.js @@ -550,10 +550,13 @@ exports.nodeProcessAborted = function nodeProcessAborted(exitCode, signal) { // or SIGABRT (depending on the compiler). const expectedSignals = ['SIGILL', 'SIGTRAP', 'SIGABRT']; - // On Windows, v8's base::OS::Abort triggers an access violation, + // On Windows, 'aborts' are of 2 types, depending on the context: + // (i) Forced access violation, if --abort-on-uncaught-exception is on // which corresponds to exit code 3221225477 (0xC0000005) + // (ii) raise(SIGABRT) or abort(), which lands up in CRT library calls + // which corresponds to exit code 3. if (exports.isWindows) - expectedExitCodes = [3221225477]; + expectedExitCodes = [3221225477, 3]; // When using --abort-on-uncaught-exception, V8 will use // base::OS::Abort to terminate the process.