summaryrefslogtreecommitdiff
path: root/test/abort
Commit message (Collapse)AuthorAgeFilesLines
* test: allow SIGBUS in signal-handler abort testMichaël Zasso2023-05-051-3/+6
| | | | | | | | | | | FreeBSD uses SIGBUS after update to v12.4. Refs: https://github.com/nodejs/build/issues/3134 PR-URL: https://github.com/nodejs/node/pull/47851 Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Michael Dawson <midawson@redhat.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
* test: remove unreachable returnjakecastelli2023-02-251-1/+0
| | | | | | | | PR-URL: https://github.com/nodejs/node/pull/46807 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Debadree Chatterjee <debadree333@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
* process: make process.config read onlySergey Petushkov2022-09-101-1/+1
| | | | | | | | | | Fixes: https://github.com/nodejs/node/issues/43581 PR-URL: https://github.com/nodejs/node/pull/43627 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Chengzhong Wu <legendecas@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Tobias Nießen <tniessen@tnie.de>
* test: mark flaky tests on smartosFeng Yu2022-06-281-0/+10
| | | | | | | | | PR-URL: https://github.com/nodejs/node/pull/43596 Refs: https://github.com/nodejs/node/issues/43457 Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Filip Skokan <panva.ip@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Richard Lau <rlau@redhat.com> Reviewed-By: Darshan Sen <raisinten@gmail.com>
* test: use `assert.match` instead of `regexp.test`Michaël Zasso2021-08-311-5/+5
| | | | | | | | | | | PR-URL: https://github.com/nodejs/node/pull/39928 Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Anto Aravinth <anto.aravinth.cse@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Darshan Sen <raisinten@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Zijian Liu <lxxyxzj@gmail.com>
* test: adapt abort tests for new Windows codeMichaël Zasso2021-06-102-2/+2
| | | | | | | | | | | | | | | V8 9.1 changed the way it aborts on uncaught exceptions on Windows. It now uses the code 0x80000003 (exception breakpoint) instead of 0xC0000005 (access violation). Refs: https://github.com/v8/v8/commit/26d85acee2c052aa128b77e2e5fde1d4c9306910 PR-URL: https://github.com/nodejs/node/pull/38273 Reviewed-By: Jiawen Geng <technicalcute@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Michael Dawson <midawson@redhat.com> Reviewed-By: Mary Marchini <oss@mmarchini.me>
* test: move abort test from pummel to abort directoryRich Trott2021-04-271-0/+48
| | | | | | | | | | | test-abort-fatal-error is not resource intensive and would be better in the abort directory than the pummel directory. PR-URL: https://github.com/nodejs/node/pull/38396 Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
* test: correct test commentEvan Lucas2021-04-061-1/+2
| | | | | | | | | | This corrects a comment on the signal type used in the test. PR-URL: https://github.com/nodejs/node/pull/38095 Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
* test: prepare for consistent comma-dangle lint ruleRich Trott2021-04-011-1/+1
| | | | | | | | | Make changes so that tests will pass when the comma-dangle settings applied to the rest of the code base are also applied to tests. PR-URL: https://github.com/nodejs/node/pull/37930 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Derek Lewis <DerekNonGeneric@inf.is>
* test: mark flaky tests on IBM iRichard Lau2021-01-191-0/+11
| | | | | | | | | | | PR-URL: https://github.com/nodejs/node/pull/36986 Refs: https://github.com/nodejs/node/issues/34410 Refs: https://github.com/nodejs/node/issues/36925 Refs: https://github.com/nodejs/node/issues/36929 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Michael Dawson <midawson@redhat.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
* test: add SIGTRAP to test-signal-handlerAsh Cripps2020-12-081-2/+2
| | | | | | | PR-URL: https://github.com/nodejs/node/pull/36368 Reviewed-By: Richard Lau <rlau@redhat.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Evan Lucas <evanlucas@me.com>
* Revert "src: add aliased-buffer-overflow abort test"Richard Lau2020-05-064-68/+0
| | | | | | | | | | This reverts commit babeb58c5286c55f00e6dfc48c0b609314bcc381. PR-URL: https://github.com/nodejs/node/pull/33196 Refs: https://github.com/nodejs/node/pull/31740 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
* test: copy addons .gitignore to test/abort/Anna Henningsen2020-04-051-0/+7
| | | | | | | | | | | | `cp test/addons/.gitignore test/abort/.gitignore`, because the new addon test in there leaves a build/ folder lying around and somebody is bound to use `git add .` earlier or later. Refs: https://github.com/nodejs/node/pull/31740 PR-URL: https://github.com/nodejs/node/pull/32624 Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: James M Snell <jasnell@gmail.com>
* src: add aliased-buffer-overflow abort testChristian Niederer2020-03-304-0/+68
| | | | | | | | | | | | Added native extension similar to test/addons/stringbytes-external-exceeded-max. Added an abort test to regression test the non overflow behaviour. PR-URL: https://github.com/nodejs/node/pull/31740 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: David Carlier <devnexen@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
* src: improve checked uv loop close outputAnna Henningsen2019-12-071-10/+15
| | | | | | | | | | | | | | | | | | | | | | Addon developers may run into this when not closing libuv handles inside Workers. Previously, output may have included unhelpful statements such as `uv loop at ... has 0 active handles`, which may sound like everything’s supposed to be fine actually. So, instead of printing the active handle count, print the total handle count and mark active handles individually. Also, fix the test for this to work properly and make sure that parsing finishes properly. PR-URL: https://github.com/nodejs/node/pull/30814 Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: David Carlier <devnexen@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
* test: add addon tests for `RegisterSignalHandler()`Anna Henningsen2019-06-141-0/+7
| | | | | | | | | | Ensure coverage for the different combinations of arguments. PR-URL: https://github.com/nodejs/node/pull/27775 Refs: https://github.com/nodejs/node/pull/27246 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
* src: reset SIGSEGV handler before crashingAnna Henningsen2019-06-141-0/+23
| | | | | | | | | | | Without this, we would re-enter the signal handler immediately after re-raising the signal, leading to an infinite loop. PR-URL: https://github.com/nodejs/node/pull/27775 Refs: https://github.com/nodejs/node/pull/27246 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
* test: remove usage of `process.binding()`Anna Henningsen2019-03-071-2/+4
| | | | | | | | | | | | | | Prefer `internalBinding` or other equivalents over `process.binding()` (except in tests checking `process.binding()` itself). PR-URL: https://github.com/nodejs/node/pull/26304 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Minwoo Jung <minwoo@nodesource.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Gus Caplan <me@gus.host> Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
* benchmark,doc,lib,test: capitalize commentsRuben Bridgewater2019-02-281-1/+1
| | | | | | | | | | This updates a lot of comments. PR-URL: https://github.com/nodejs/node/pull/26223 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com> Reviewed-By: Anto Aravinth <anto.aravinth.cse@gmail.com>
* worker: ignore --abort-on-uncaught-exception for terminate()Anna Henningsen2019-02-181-0/+24
| | | | | | | | | When running Worker threads with `--abort-on-uncaught-exception`, do not abort the process when `worker.terminate()` is called. PR-URL: https://github.com/nodejs/node/pull/26111 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
* src: add PrintLibuvHandleInformation debug helperAnna Henningsen2019-02-051-1/+1
| | | | | | | | | | This function is not only helpful for debugging crashes, but can also be used as an ad-hoc debugging statement. PR-URL: https://github.com/nodejs/node/pull/25905 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: James M Snell <jasnell@gmail.com>
* worker: remove `--experimental-worker` flagAnna Henningsen2019-01-091-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | Having an experimental feature behind a flag makes change if we are expecting significant breaking changes to its API. Since the Worker API has been essentially stable since its initial introduction, and no noticeable doubt about possibly not keeping the feature around has been voiced, removing the flag and thereby reducing the barrier to experimentation, and consequently receiving feedback on the implementation, seems like a good idea. PR-URL: https://github.com/nodejs/node/pull/25361 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Yuta Hiroto <hello@hiroppy.me> Reviewed-By: Shingo Inoue <leko.noor@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Masashi Hirano <shisama07@gmail.com> Reviewed-By: Weijia Wang <starkwang@126.com> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
* test: remove flag for test-addon-uv-handle-leakRich Trott2019-01-061-2/+2
| | | | | | | | | | | | | | test-addon-uv-handle-leak only requires worker_threads for the subprocess which it explicitly calls with --experimental-worker. The main test itself does not need it. Remove Flags: comment and move loading of worker_threads into subprocess-only logic. PR-URL: https://github.com/nodejs/node/pull/25327 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com> Reviewed-By: Daijiro Wachi <daijiro.wachi@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
* src: unload addons when environment quitsGabriel Schulhof2018-12-191-0/+10
| | | | | | | | | | This is an alternative to https://github.com/nodejs/node/pull/23319 which attaches the loaded addons to the environment and closes them when the environment is destroyed. PR-URL: https://github.com/nodejs/node/pull/24861 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
* tools: capitalize sentencesRuben Bridgewater2018-12-101-1/+1
| | | | | | | | | | | | This adds the `capitalized-comments` eslint rule to verify that actual sentences use capital letters as starting letters. It ignores special words and all lines below 62 characters. PR-URL: https://github.com/nodejs/node/pull/24808 Reviewed-By: Sam Ruby <rubys@intertwingly.net> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: Ujjwal Sharma <usharma1998@gmail.com> Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
* test: removed extraneous argument 's'Jackson Chui2018-11-081-1/+1
| | | | | | | PR-URL: https://github.com/nodejs/node/pull/24213 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
* test: remove isGlibc from commonJames M Snell2018-08-231-1/+18
| | | | | | | | | | | | | | | | | | | The `common.isGlibc()` function is called exactly once from only one test. There's no reason for it to be in `require('../common')` at the current time. If it ends up needing to be used by multiple tests, it can easily be moved into it's own common sub-module (e.g. `require('../common/isglibc')` ... for now tho, just move it into the one test that uses it and simplify the implementation a bit to remove unnecessary caching. PR-URL: https://github.com/nodejs/node/pull/22443 Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de>
* worker,src: display remaining handles if `uv_loop_close` failsAnna Henningsen2018-06-131-0/+97
| | | | | | | | | | | | | | | | | | | | Right now, we crash the process if there are handles remaining on the event loop when we exit (except for the main thread). This does not provide a lot of information about causes, though; in particular, we don’t show which handles are pending and who own them. This patch adds debug output to these cases to help with the situation. PR-URL: https://github.com/nodejs/node/pull/21238 Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Gus Caplan <me@gus.host> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
* test: fix test-abort-backtrace in shared lib buildYihong Wang2018-03-111-1/+2
| | | | | | | | | | | | | | | | When using shared lib build, the binary path in the stack frames points to shared lib. Change the checking criteria in the test case to match that. Refs: https://github.com/nodejs/node/issues/18535 Signed-off-by: Yihong Wang <yh.wang@ibm.com> PR-URL: https://github.com/nodejs/node/pull/19213 Refs: https://github.com/nodejs/node/issues/18535 Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
* test: fix spelling in test case commentsTobias Nießen2018-01-111-2/+2
| | | | | | | | | | | PR-URL: https://github.com/nodejs/node/pull/18018 Reviewed-By: Jon Moss <me@jonathanmoss.me> Reviewed-By: Anatoli Papirovski <apapirovski@mac.com> Reviewed-By: Weijia Wang <starkwang@126.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com>
* vm: never abort on caught syntax errorAnna Henningsen2017-12-051-4/+11
| | | | | | | | | | | | | | Keep track of C++ `TryCatch` state to avoid aborting when an exception is thrown inside one, and re-throw in JS to make sure the exception is being picked up a second time by a second uncaught exception handler, if necessary. Add a bit of a hack to `AppendExceptionLine` to avoid overriding the line responsible for re-throwing the exception. PR-URL: https://github.com/nodejs/node/pull/17394 Fixes: https://github.com/nodejs/node/issues/13258 Reviewed-By: James M Snell <jasnell@gmail.com>
* test: refactor using template stringYoshiya Hinosawa2017-11-261-2/+2
| | | | | | | | | | | | | Use template string where it's appropriate. PR-URL: https://github.com/nodejs/node/pull/17314 Reviewed-By: Daijiro Wachi <daijiro.wachi@gmail.com> Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By: Jon Moss <me@jonathanmoss.me> Reviewed-By: James M Snell <jasnell@gmail.com>
* src: implement backtrace-on-abort for windowsAnna Henningsen2017-11-151-5/+4
| | | | | | | PR-URL: https://github.com/nodejs/node/pull/16951 Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
* zlib: warn before crash on invalid internals usageAnna Henningsen2017-11-061-0/+20
| | | | | | | | | | | | | | PR-URL: https://github.com/nodejs/node/pull/16657 Refs: https://github.com/nodejs/node/issues/16649 Refs: https://github.com/nodejs/node/issues/14161 Reviewed-By: Evan Lucas <evanlucas@me.com> Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: Myles Borins <myles.borins@gmail.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Daijiro Wachi <daijiro.wachi@gmail.com> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Anna Henningsen <anna@addaleax.net>
* tools: enable additional eslint rulesAnatoli Papirovski2017-10-191-4/+3
| | | | | | | | | | | | | | | | | | | | | Enable additional rules that node either already adheres to or it makes sense to do so going forward: for-direction, accessor-pairs, no-lonely-if and symbol-description. Fix all instances of no-lonely-if in lib & test and disable accessor-pairs in test-util-inspect. PR-URL: https://github.com/nodejs/node/pull/16243 Refs: https://eslint.org/docs/rules/for-direction Refs: https://eslint.org/docs/rules/accessor-pairs Refs: https://eslint.org/docs/rules/no-lonely-if Refs: https://eslint.org/docs/rules/symbol-description Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com> Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
* test,process: run 'abort' suite on WindowsRefael Ackermann2017-09-032-18/+23
| | | | | | | | | PR-URL: https://github.com/nodejs/node/pull/15056 Fixes: https://github.com/nodejs/node/issues/14012 Refs: https://github.com/nodejs/node/pull/14013 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
* test: run abort testsRich Trott2017-08-261-1/+1
| | | | | | | | | | | | | | | | | | Currently, tests in test/abort do not run in CI. This change configures the test runner to not write core files for abort tests and to run them. PR-URL: https://github.com/nodejs/node/pull/14013 Fixes: https://github.com/nodejs/node/issues/14012 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com> Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
* test: improve test-abort-backtraceRich Trott2017-08-261-7/+13
| | | | | | | | | | | | | | | | | | Improve error message by showing output when frames output does not meet expectations. Since we can't tell at runtime if we have the correct libc for backtraces, allow an empty backtrace and run the test on all platforms. PR-URL: https://github.com/nodejs/node/pull/14013 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com> Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
* test: improve test-abort-uncaught-exceptionRich Trott2017-08-261-2/+2
| | | | | | | | | | | | | | | | | Add `SIGTRAP` to allowed signals (seen on PPC machines in CI). Improve message when assertion fails in test-abort-uncaught-exception by providing the signal name that was not expected. PR-URL: https://github.com/nodejs/node/pull/14013 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com> Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
* src: adjust windows abort behaviorJared Kantrowitz2017-08-071-1/+1
| | | | | | | | | | | | | | | | | | | Raising SIGABRT is handled in the CRT in windows, calling _exit() with ambiguous code "3" by default. This adjustment to the abort behavior gives a more sane exit code on abort, by calling _exit directly with code 134. PR-URL: https://github.com/nodejs/node/pull/13947 Fixes: https://github.com/nodejs/node/issues/12271 Refs: https://docs.microsoft.com/en-us/cpp/c-runtime-library/reference/abort Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Timothy Gu <timothygu99@gmail.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
* test: simplify test skippingVse Mozhet Byt2017-07-041-5/+3
| | | | | | | | | | | | * Make common.skip() exit. Also add common.printSkipMessage() for partial skips. * Don't make needless things before skip PR-URL: https://github.com/nodejs/node/pull/14021 Fixes: https://github.com/nodejs/node/issues/14016 Reviewed-By: Refael Ackermann <refack@gmail.com>
* src: fix process.abort() interaction with V8Anna Henningsen2017-07-021-0/+24
| | | | | | | | | | | | | | | | | | Since V8 5.9 V8 installs a default signal handler for some signals when creating a default platform instance that prints a stack trace. However, Node already does the same thing, so it would seem like the two different stack traces would be printed; also, the V8 handler would lead to a `SIGSEGV` under some circumstances, rather than letting the abort continue normally. Resolve this by disabling V8’s signal handler by default. PR-URL: https://github.com/nodejs/node/pull/13985 Fixes: https://github.com/nodejs/node/issues/13865 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
* http: assert parser.consume argument's typeGireesh Punathil2017-06-051-0/+28
| | | | | | | | | | | | | | | | | | Unchecked argument conversion in Parser::Consume crashes node in an slightly undesirable manner - 'unreachable code' in parser. Make sure we validate the incoming type at the earliest point. PR-URL: https://github.com/nodejs/node/pull/12288 Fixes: https://github.com/nodejs/node/issues/12178 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Alexey Orlenko <eaglexrlnk@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Refael Ackermann <refack@gmail.com>
* test: add abort test for backtrace validationcjihrig2016-06-291-0/+24
| | | | | | | | | This commit adds a test that validates backtraces which are printed on fatal errors. PR-URL: https://github.com/nodejs/node/pull/6734 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
* test: fix abort/test-abort-uncaught-exceptionBen Noordhuis2016-06-291-6/+9
| | | | | | | | | The --abort-on-uncaught-exception can terminate the process with either a SIGABRT or a SIGILL signal but the test only expected SIGABRT. PR-URL: https://github.com/nodejs/node/pull/6734 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
* test: add testcfg.py to test/abort/Ben Noordhuis2016-06-291-0/+6
| | | | | | | | `python tools/test.py abort` won't work without one. PR-URL: https://github.com/nodejs/node/pull/6734 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
* src: honor --abort_on_uncaught_exception flagEvan Lucas2015-09-171-0/+31
Fix regression introduced in 0af4c9ea7434e4f505dbe071357e4bc3b4ab2a8a that ignores the --abort-on-uncaught-exception flag. Prior to that commit, the flag was passed through to v8. After that commit, the process just calls exit(1). PR-URL: https://github.com/nodejs/node/pull/2776 Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Brian White <mscdex@mscdex.net> Reviewed-by: Trevor Norris <trev.norris@gmail.com>