Commit f84a5e19 authored by Yang Guo's avatar Yang Guo Committed by Evan Lucas
Browse files

test: use JSON.stringify to trigger stack overflow

V8's interpreter performs stack checks both at the call site and at the
function entry. A recursive function could therefore trigger stack
overflow at two different source locations. Instead of recursion, call
JSON.stringify on a deeply nested array.

PR-URL: https://github.com/nodejs/node/pull/12481


Reviewed-By: default avatarAnna Henningsen <anna@addaleax.net>
Reviewed-By: default avatarSakthipriyan Vairamani <thechargingvolcano@gmail.com>
Reviewed-By: default avatarFranziska Hinkelmann <franziska.hinkelmann@gmail.com>
Reviewed-By: default avatarColin Ihrig <cjihrig@gmail.com>
Reviewed-By: default avatarBenjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: default avatarJames M Snell <jasnell@gmail.com>
parent e77f1e21
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment