There's a stack overflow when applying the node-config prototypes to the following javascript configuration file:
module.exports = {
"test": {
"innerProp": process.stdout
}
}
Code to trigger:
const config = require('config');
config.get('test');
It appears to me like util.attachProtoDeep is unable to handle circular references. From what I can see, this is the chain that's causing the stack to overflow:
+----------------------+
|process.stdout.stream <-----+
+----------+-----------+ |
| |
v |
+-----+--------+ |
|stream._handle| |
+-------+------+ |
| |
v |
+------+------+ |
|_handle.owner+--------+
+-------------+