Skip to content

lib: be robust when process global is clobbered

Program bugs sometimes happen to overwrite the process global object, leading to unpredictable runtime errors. The bug is often hard to track down because the crash usually looks unrelated and happens far away from the bug point.

Make core mostly immune to such corruption by ensuring that all core modules close over a direct reference to the process object instead of a dynamic reference.

CI: https://ci.nodejs.org/job/node-test-pull-request/5234/

Merge request reports

Loading