0
0
mirror of https://github.com/nodejs/node.git synced 2024-12-01 16:10:02 +01:00
nodejs/lib
Anna Henningsen d3a8a23089
fs: forbid concurrent operations on Dir handle
libuv does not expect concurrent operations on `uv_dir_t` instances,
and will gladly create memory leaks, corrupt data, or crash the
process.

This patch forbids that, and:

- Makes sure that concurrent async operations are run sequentially
- Throws an exception if sync operations are attempted during an
  async operation

The assumption here is that a thrown exception is preferable to
a potential hard crash.

This fully fixes flakiness from `parallel/test-fs-opendir` when
run under ASAN.

PR-URL: https://github.com/nodejs/node/pull/33274
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2020-05-15 19:36:50 +02:00
..
fs fs: add fs/promises alias module 2020-02-18 22:15:50 -08:00
internal fs: forbid concurrent operations on Dir handle 2020-05-15 19:36:50 +02:00
_http_agent.js http: ensure client request emits close 2020-05-04 11:35:58 +02:00
_http_client.js http: don't destroy completed request 2020-05-11 18:02:32 +02:00
_http_common.js http: fixes memory retention issue with FreeList and HTTPParser 2020-05-05 16:14:46 +02:00
_http_incoming.js http: return this from IncomingMessage#destroy() 2020-05-09 13:57:28 -04:00
_http_outgoing.js http: return this from OutgoingMessage#destroy() 2020-05-09 13:57:29 -04:00
_http_server.js http: emit 'error' on aborted server request 2020-05-10 22:11:21 +02:00
_stream_duplex.js stream: let Duplex re-use Writable properties 2020-04-29 05:08:31 +02:00
_stream_passthrough.js
_stream_readable.js stream: simplify Readable push/unshift logic 2020-04-30 11:07:06 +02:00
_stream_transform.js stream: fix _final and 'prefinish' timing 2020-04-22 09:40:03 +02:00
_stream_wrap.js
_stream_writable.js stream: write should throw on unknown encoding 2020-04-28 15:59:46 +02:00
_tls_common.js tls: for...of in _tls_common.js 2019-12-17 08:11:13 -05:00
_tls_wrap.js tls: fix --tls-keylog option 2020-05-14 16:52:52 +02:00
.eslintrc.yaml lib: replace BigInt64Array global by the primordials 2020-01-13 12:42:21 +01:00
assert.js assert: port common.mustCall() to assert 2020-04-23 10:11:47 -07:00
async_hooks.js async_hooks: move PromiseHook handler to JS 2020-05-09 07:52:22 +02:00
buffer.js buffer: improve copy() performance 2020-05-09 08:04:10 +02:00
child_process.js lib: replace use of Error with primordials 2020-01-04 14:50:18 -08:00
cluster.js
console.js
constants.js
crypto.js tls: provide default cipher list from command line 2020-04-13 18:48:23 +02:00
dgram.js lib: move isLegalPort to validators, refactor 2020-03-05 11:52:53 -08:00
dns.js dns: remove duplicate code 2020-04-07 20:35:07 +02:00
domain.js lib: replace Map global by the primordials 2020-01-04 14:56:52 -08:00
events.js events: fix removeListener for Symbols 2020-03-07 10:47:12 -08:00
fs.js fs: add .ref() and .unref() methods to watcher classes 2020-05-09 07:59:08 +02:00
http2.js
http.js http: expose http.validate-header-name/value 2020-05-09 07:55:55 +02:00
https.js https: prevent options object from being mutated 2020-01-03 20:09:27 -08:00
inspector.js lib: replace Map global by the primordials 2020-01-04 14:56:52 -08:00
module.js module: add API for interacting with source maps 2020-01-14 12:39:06 -08:00
net.js net: autoDestroy Socket 2020-04-02 23:38:32 +02:00
os.js src: create a getter for kernel version 2020-03-09 12:44:16 +01:00
path.js path: fix comment grammar 2020-04-28 19:10:26 +02:00
perf_hooks.js perf_hooks: fix error message for invalid entryTypes 2020-05-10 13:53:15 +02:00
process.js
punycode.js
querystring.js
readline.js readline: remove intermediate variable 2020-02-09 11:06:07 -05:00
repl.js repl: improve repl autocompletion for require calls 2020-05-15 01:48:40 +02:00
stream.js
string_decoder.js
sys.js
timers.js lib: created isValidCallback helper 2020-04-14 13:54:21 +08:00
tls.js tls: provide default cipher list from command line 2020-04-13 18:48:23 +02:00
trace_events.js lib: replace Set global by the primordials 2020-01-04 12:41:09 -08:00
tty.js
url.js
util.js lib: replace use of Error with primordials 2020-01-04 14:50:18 -08:00
v8.js v8: use AliasedBuffers for passing heap statistics around 2020-04-28 19:13:20 +02:00
vm.js Revert "vm: add importModuleDynamically option to compileFunction" 2020-05-15 12:14:35 +02:00
wasi.js wasi: update start() behavior to match spec 2020-04-28 13:04:43 -04:00
worker_threads.js
zlib.js zlib: reject windowBits=8 when mode=GZIP 2020-05-09 07:54:40 +02:00