Validate argument arity in prologues before ActRec spill
commite565acc6ecfc7bf06fb3a531be7d3ad8c7451065
authorJan Oravec <jan@fb.com>
Thu, 8 Oct 2020 02:22:32 +0000 (7 19:22 -0700)
committerFacebook GitHub Bot <facebook-github-bot@users.noreply.github.com>
Thu, 8 Oct 2020 02:28:47 +0000 (7 19:28 -0700)
tree6fd27af7512f7f1d8c71df52d111a8262fd30129
parent74167bffcaf63cf436d6c4129e480704aa61f558
Validate argument arity in prologues before ActRec spill

Summary:
Move the validation of argument arity before ActRec spill.

All errors will be blamed to the call site rather than the first opcode of the
callee.

Reviewed By: ricklavoie

Differential Revision: D24154740

fbshipit-source-id: cfb5afad0531461eaa82a3c0e662bc43c2907827
17 files changed:
hphp/runtime/base/execution-context.cpp
hphp/runtime/vm/bytecode.cpp
hphp/runtime/vm/interp-helpers.h
hphp/runtime/vm/jit/irgen-func-prologue.cpp
hphp/runtime/vm/jit/irgen-inlining.cpp
hphp/runtime/vm/jit/translator-runtime.cpp
hphp/runtime/vm/jit/translator-runtime.h
hphp/runtime/vm/runtime.cpp
hphp/runtime/vm/runtime.h
hphp/test/quick/too-few-args.php.expectf
hphp/test/slow/new_object_expression/782.php.expectf
hphp/test/slow/reified_generics/too-few-args.php.expectf
hphp/test/slow/too-few-params-1.php.expectf
hphp/test/slow/too-many-params-1.php.expectf
hphp/test/slow/too-many-params-2.php.expectf
hphp/test/slow/too-many-params-3.php.expectf
hphp/test/slow/too-many-params-exception.php.expectf