Browse Source

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: https://github.com/nodejs/node/pull/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>
v6
Gireesh Punathil 8 years ago
committed by Anna Henningsen
parent
commit
6914aeaefd
No known key found for this signature in database GPG Key ID: D8B9F5AEAE84E4CF
  1. 7
      test/common/index.js

7
test/common/index.js

@ -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.

Loading…
Cancel
Save