0
0
mirror of https://github.com/nodejs/node.git synced 2024-12-01 16:10:02 +01:00
nodejs/lib/internal
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
..
assert assert: port common.mustCall() to assert 2020-04-23 10:11:47 -07:00
bootstrap src: add primordials to arguments comment 2020-05-13 09:23:25 +02:00
child_process lib: remove unnecesary else block 2020-04-18 16:33:34 -05:00
cluster lib: refactored scheduling policy assignment 2020-05-09 07:50:11 +02:00
console console: support console constructor groupIndentation option 2020-04-29 03:51:03 +02:00
crypto crypto: generator must be int32 in DiffieHellman() 2020-04-28 19:22:05 +02:00
dns dns: add dns.ALL hints flag constant 2020-03-30 17:21:13 +02:00
fs fs: forbid concurrent operations on Dir handle 2020-05-15 19:36:50 +02:00
http2 http2: wait for secureConnect before initializing 2020-04-22 18:22:46 -07:00
main module: loader getSource, getFormat, transform hooks 2020-01-07 01:31:05 +02:00
modules Revert "vm: add importModuleDynamically option to compileFunction" 2020-05-15 12:14:35 +02:00
per_context worker: improve MessagePort performance 2020-02-07 11:01:59 -10:00
policy lib: add RegExp primordials 2020-01-07 19:26:15 -08:00
process src: add support for TLA 2020-05-14 12:39:23 -05:00
readline util: improve unicode support 2020-01-22 15:33:03 +01:00
repl repl: show reference errors during preview 2020-05-15 01:48:13 +02:00
source_map lib: replace Array to ArrayIsArray by primordials 2020-03-30 10:22:52 +02:00
streams stream: make from read one at a time 2020-05-06 22:39:33 +02:00
test
util test: update c8 ignore comment 2020-05-03 22:27:06 -07:00
vm src: add support for TLA 2020-05-14 12:39:23 -05:00
worker lib: replace Symbol global by the primordials Symbol 2019-12-08 13:38:58 +01:00
assert.js benchmark,doc,lib,test: prepare for padding lint rule 2019-11-30 06:28:29 -08:00
async_hooks.js async_hooks: move PromiseHook handler to JS 2020-05-09 07:52:22 +02:00
buffer.js lib: replace Float32Array global by the primordials 2020-01-07 15:09:59 -08:00
child_process.js child_process: remove unnecessary use of inner state 2020-01-11 19:27:54 -08:00
cli_table.js util: improve unicode support 2020-01-22 15:33:03 +01:00
constants.js
dgram.js lib: replace Symbol global by the primordials Symbol 2019-12-08 13:38:58 +01:00
dtrace.js
encoding.js util: text decoding allows SharedArrayBuffer 2020-03-13 17:33:41 +01:00
error-serdes.js lib: replace use of Error with primordials 2020-01-04 14:50:18 -08:00
errors.js fs: forbid concurrent operations on Dir handle 2020-05-15 19:36:50 +02:00
fixed_queue.js lib: unnecessary const assignment for class 2020-04-24 22:53:36 +03:00
freelist.js http: remove unused hasItems() from freelist 2019-12-03 15:00:45 -08:00
freeze_intrinsics.js lib: replace Symbol global by the primordials Symbol 2019-12-08 13:38:58 +01:00
heap_utils.js worker: add ability to take heap snapshot from parent thread 2020-02-03 07:04:13 -08:00
histogram.js perf,src: add HistogramBase and internal/histogram.js 2020-03-02 11:01:00 -08:00
http.js lib: replace Symbol global by the primordials Symbol 2019-12-08 13:38:58 +01:00
idna.js
inspector_async_hook.js lib: replace Set global by the primordials 2020-01-04 12:41:09 -08:00
js_stream_socket.js lib: replace Symbol global by the primordials Symbol 2019-12-08 13:38:58 +01:00
linkedlist.js
net.js lib: move isLegalPort to validators, refactor 2020-03-05 11:52:53 -08:00
options.js tls: move getAllowUnauthorized to internal/options 2020-04-21 17:21:45 -07:00
priority_queue.js lib: replace Symbol global by the primordials Symbol 2019-12-08 13:38:58 +01:00
querystring.js lib: enforce use of Array from primordials 2019-11-27 19:29:01 +01:00
readme.md
repl.js lib: enforce use of primordial Number 2019-11-30 13:58:25 +01:00
socket_list.js
stream_base_commons.js lib: fix return type of setTimeout in net.Socket 2020-04-11 12:22:12 +08:00
timers.js lib: fix typo in timers insert function comment 2020-05-10 14:09:39 +02:00
tls.js tls: for...of in _tls_common.js 2019-12-17 08:11:13 -05:00
trace_events_async_hooks.js lib: replace Symbol global by the primordials Symbol 2019-12-08 13:38:58 +01:00
tty.js tty: do not end in an infinite warning recursion 2020-02-09 13:39:56 +01:00
url.js worker: allow URL in Worker constructor 2020-03-13 10:50:30 +01:00
util.js util: use a global symbol for util.promisify.custom 2020-03-12 19:51:25 +01:00
v8_prof_polyfill.js lib: replace use of Error with primordials 2020-01-04 14:50:18 -08:00
v8_prof_processor.js
validators.js lib: fix validateport error message when allowZero is false 2020-04-28 19:15:03 +02:00
watchdog.js src,lib: make ^C print a JS stack trace 2020-01-28 13:52:27 +08:00
worker.js worker: add stack size resource limit option 2020-04-29 05:13:42 +02:00

Internal Modules

The modules in lib/internal are intended for internal use in Node.js core only, and are not accessible with require() from user modules. These modules can be changed at any time. Reliance on these modules outside of core is not supported in any way.