Add getFunction calls for endianness test function signatures#534
Add getFunction calls for endianness test function signatures#534leonm1 wants to merge 1 commit intoproxy-wasm:mainfrom
Conversation
|
Could we figure out a test to fix / detect this in this repo? It's the reason for the majority of build errors. |
I plan to do so. |
src/null/null_plugin.cc
Outdated
| } | ||
|
|
||
| void NullPlugin::getFunction(std::string_view function_name, WasmCall_lf *f) { | ||
| if (!wasm_vm_->integration()->getNullVmFunction(function_name, true, 1, this, f)) { |
There was a problem hiding this comment.
The 2nd argument is returns_word, which clearly isn't the case here.
Also (and this I something I've missed while reviewing #525), the WasmCall_lf doesn't follow the existing convention of WasmCall<return_type>_<argument_types>.
There was a problem hiding this comment.
IIUC these are all signatures added for cpp-host testing? Do we need to call getNullVmFunction in that case, or can we just log an error and clear the return pointer?
There was a problem hiding this comment.
Also (and this I something I've missed while reviewing #525), the WasmCall_lf doesn't follow the existing convention of WasmCall<return_type>_<argument_types>.
The calls follow the convention used by WasmCallback, which was chosen since the return types needed more type flexibility than the WasmCallWord<> template provided, just like the WasmCallback types.
IIUC these are all signatures added for cpp-host testing? Do we need to call getNullVmFunction in that case, or can we just log an error and clear the return pointer?
Indeed, I have removed the implementations and changed these functions to log an error about unexpected function calls. These signatures are not part of the Proxy-Wasm spec.
Signed-off-by: Matt Leon <mattleon@google.com>
These missing functions (added through the new function call types in #525) result in the following linker error when compiling against NullVM: