Commit 7239494b authored by Bryce Baril's avatar Bryce Baril Committed by minwoojung
Browse files

buffer: Prevent Buffer constructor deopt

The Buffer constructor will generally get inlined, but any call to the Buffer
constructor for a string without encoding will cause an eager deoptimization
of any function that inlined the Buffer constructor. This is due to a an
out-of-bounds read on `arguments[1]`. This change prevents that deopt.

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


Reviewed-By: default avatarColin Ihrig <cjihrig@gmail.com>
Reviewed-By: default avatarJames M Snell <jasnell@gmail.com>
Reviewed-By: default avatarTrevor Norris <trev.norris@gmail.com>
Reviewed-By: default avatarMinwoo Jung <jmwsoft@gmail.com>
parent e2dec988
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