Permalink
Browse files

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

PR-URL: #12856
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
  • Loading branch information...
gireeshpunathil authored and addaleax committed May 5, 2017
1 parent c68ebe8 commit 6914aeaefd55b0b57364e70d0ef4374040539792
Showing with 5 additions and 2 deletions.
  1. +5 −2 test/common/index.js
View
@@ -592,10 +592,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.

0 comments on commit 6914aea

Please sign in to comment.