On Thu, Nov 28, 2013 at 11:17 AM, Qingping Hou <dave2008713@xxxxxxxxx> wrote: > On Wed 27 Nov 2013 10:07:56 PM EST, Jovi Zhangwei wrote: >>> For the fix, can I just create a new member for FFI in the global ktap >>> state? >>> >> It have to if it's needed. >> > > OK, we will work on the new patch tomorrow. > > Also, please let us know if you find any bad design in this > implementation so we can fix them altogether. Hmm, I have to run and test it without kernel crash firstly, then review it more carefully. :) Some obvious issues found in ffi testing: - usespace compiled without FFI + ktapvm compiled with FFI There reported "error: get key from non-table" I think this case should compile failure when ffi used in script, not "ignore cdef" - usespace compiled with FFI + ktapvm compiled without FFI Also should check it when loading trunk file. - Compile failed in test/ffi/funct.c. (there have strict checking in my compiler) -void funct_void() +void funct_void(void) - move global variables int global_state (as we found) - No csym allocation if no ffi used in script (as we found) After those issues addressed, then we can review further. This is a big patch set, and a big feature, so I have to spend more time to review it carefully, and make sure it cannot crash kernel easily. :) Hopefully we can review the code completely in two weeks, in the meantime, you can continue develop new things base on current work. :) Thanks. Jovi.