Skip to content

Commit

Permalink
test: detect all types of aborts in windows
Browse files Browse the repository at this point in the history
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 10, 2017
1 parent c68ebe8 commit 6914aea
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions test/common/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit 6914aea

Please sign in to comment.