| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 28e89f6 commit f21d78d
2 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -705,6 +705,7 @@ void DefaultProcessExitHandler(Environment* env, int exit_code) { | |||
| 705 | 705 | env->set_can_call_into_js(false); | |
| 706 | 706 | env->stop_sub_worker_contexts(); | |
| 707 | 707 | DisposePlatform(); | |
| 708 | + uv_library_shutdown(); | ||
| 708 | 709 | exit(exit_code); | |
| 709 | 710 | } | |
| 710 | 711 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -0,0 +1,28 @@ | |||
| 1 | + 'use strict'; | ||
| 2 | + const common = require('../common'); | ||
| 3 | + if (!common.hasCrypto) { common.skip('missing crypto'); } | ||
| 4 | + const assert = require('assert'); | ||
| 5 | + const { generateKeyPair } = require('crypto'); | ||
| 6 | + | ||
| 7 | + if (common.isWindows) { | ||
| 8 | + // Remove this conditional once the libuv change is in Node.js. | ||
| 9 | + common.skip('crashing due to https://github.com/libuv/libuv/pull/2983'); | ||
| 10 | + } | ||
| 11 | + | ||
| 12 | + // Regression test for a race condition: process.exit() might lead to OpenSSL | ||
| 13 | + // cleaning up state from the exit() call via calling its destructor, but | ||
| 14 | + // running OpenSSL operations on another thread might lead to them attempting | ||
| 15 | + // to initialize OpenSSL, leading to a crash. | ||
| 16 | + // This test crashed consistently on x64 Linux on Node v14.9.0. | ||
| 17 | + | ||
| 18 | + generateKeyPair('rsa', { | ||
| 19 | + modulusLength: 2048, | ||
| 20 | + privateKeyEncoding: { | ||
| 21 | + type: 'pkcs1', | ||
| 22 | + format: 'pem' | ||
| 23 | + } | ||
| 24 | + }, (err/* , publicKey, privateKey */) => { | ||
| 25 | + assert.ifError(err); | ||
| 26 | + }); | ||
| 27 | + | ||
| 28 | + setTimeout(() => process.exit(), common.platformTimeout(10)); | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments