unclechu / node-deep-extend

Recursive extend module
MIT License
202 stars 53 forks source link

when combine two big objects, will cause Maximum call stack size exceeded #36

Closed linhuiw closed 6 years ago

linhuiw commented 6 years ago

when combine two big objects, will cause Maximum call stack size exceeded

The error code:

deep-extend.js?ffeb:104 Uncaught RangeError: Maximum call stack size exceeded
    at Array.forEach (<anonymous>)
    at eval (deep-extend.js?ffeb:104)
    at Array.forEach (<anonymous>)
    at module.exports (deep-extend.js?ffeb:98)
    at eval (deep-extend.js?ffeb:137)
    at Array.forEach (<anonymous>)
    at eval (deep-extend.js?ffeb:104)
    at Array.forEach (<anonymous>)
    at module.exports (deep-extend.js?ffeb:98)
    at eval (deep-extend.js?ffeb:137)
unclechu commented 6 years ago

@linhuiw Could you provide such object for example? Or some bash command to generate one?

linhuiw commented 6 years ago

maybe a object contain object self will cause this issue.

unclechu commented 6 years ago

@linhuiw This was properly checked in the code, I doubt it.

unclechu commented 6 years ago

But, maybe you have a point if a link points more than one parent upper.

linhuiw commented 6 years ago

I can't reproduce this problem. maybe when i meet this issue again, i will reopen a new issue. i will close this issue first.