Don't require xbox_process_call_message and functions called with it to use dynamic...
commit5ac1f2455e743b2a2d04e348c92f682df3ac4684
authorMartyna Siejba <tysia2512@fb.com>
Wed, 11 Sep 2019 20:55:14 +0000 (11 13:55 -0700)
committerHhvm Bot <hhvm-bot@users.noreply.github.com>
Wed, 11 Sep 2019 21:01:09 +0000 (11 14:01 -0700)
tree3deaa2070cd5d26e94e81c861b650e02623504cb
parentab3684fee6fd871917060114798df5aebde79270
Don't require xbox_process_call_message and functions called with it to use dynamic pointers

Summary:
The use of `fb_call_user_func` resulted in `xbox_process_call_message` and functions passed as callables being logged as dynamic calls done without function pointers. We don't want to require such calls to use dynamic pointers, only to be marked `__DynamicallyCallable` (not `xbox_process_call_message` though). This diff:
- disables logging of calls done as rpc, http or cli server requests;
- disables logging of calls done specifically via `xbox_process_call_message`.

I try to achieve it by adding additional bool parameter in `callerDynamicCallChecks` which is propagated up

True passed as `allowDynCallNoPointer` to `hphp_invoke` from rpc-request-handler.cpp silences logging for `xbox_process_call_message`.

True passed as `allowDynCallNoPointer` to `vm_call_user_func` from `xbox_process_call_message` implementation silences jit and non-jit logs coming from functions passed as argument to  `xbox_process_call_message`.

Reviewed By: ricklavoie

Differential Revision: D17198555

fbshipit-source-id: 4e43e1da9fc4600dad517b53b104637c9ab9a15b
23 files changed:
hphp/runtime/base/builtin-functions.cpp
hphp/runtime/base/builtin-functions.h
hphp/runtime/base/execution-context.cpp
hphp/runtime/base/execution-context.h
hphp/runtime/base/externals.h
hphp/runtime/base/program-functions.cpp
hphp/runtime/base/program-functions.h
hphp/runtime/ext/server/ext_server.cpp
hphp/runtime/server/cli-server.cpp
hphp/runtime/server/http-request-handler.cpp
hphp/runtime/server/rpc-request-handler.cpp
hphp/runtime/vm/bytecode.cpp
hphp/runtime/vm/bytecode.h
hphp/runtime/vm/event-hook.cpp
hphp/runtime/vm/interp-helpers.h
hphp/test/slow/dynamic-calls/fb-call-user-builtins-notice.php [new file with mode: 0644]
hphp/test/slow/dynamic-calls/fb-call-user-builtins-notice.php.expect [new file with mode: 0644]
hphp/test/slow/dynamic-calls/fb-call-user-builtins-notice.php.hphp_opts [new file with mode: 0644]
hphp/test/slow/dynamic-calls/fb-call-user-builtins-notice.php.opts [new file with mode: 0644]
hphp/test/slow/dynamic-calls/fb-call-user-builtins.php [new file with mode: 0644]
hphp/test/slow/dynamic-calls/fb-call-user-builtins.php.expect [new file with mode: 0644]
hphp/test/slow/dynamic-calls/fb-call-user-builtins.php.hphp_opts [new file with mode: 0644]
hphp/test/slow/dynamic-calls/fb-call-user-builtins.php.opts [new file with mode: 0644]