With -DCLOSURE enabled, function parameters don't work in some scenarios due to Frame::typecheck() (giving an error message like "Bad object argument 1 for function call" depending of course which parameter receives the function pointer).
I was able to recreate this using a fresh install of cloud-server, with the following two files:
And logging in as admin, compiling the two objects and running code "send"->send_sample().
It seems to be caused by commit fc3b76ed890290a80690129375006aada7005658 where i_classname(prog_f, sclass) became className(sclass) calling it from the running frame rather than the new frame. Changing this to f->className(sclass) fixed it for me.
With -DCLOSURE enabled,
function
parameters don't work in some scenarios due toFrame::typecheck()
(giving an error message like "Bad object argument 1 for function call" depending of course which parameter receives the function pointer).I was able to recreate this using a fresh install of cloud-server, with the following two files:
/usr/admin/send.c
/usr/admin/caller.c
And logging in as admin, compiling the two objects and running
code "send"->send_sample()
.It seems to be caused by commit fc3b76ed890290a80690129375006aada7005658 where
i_classname(prog_f, sclass)
becameclassName(sclass)
calling it from the running frame rather than the new frame. Changing this tof->className(sclass)
fixed it for me.