myzhan

Results 99 comments of myzhan

I see, I'm using moonwave, which enable the luau feature and luau has syntax conflicts with lua5.4.

Thanks, I'm tring to use it in moonwave. https://github.com/evaera/moonwave/pull/186/files

Yes, I tried to figure out why by myself. It seems that not all the operators are implemented in the vm part.

停止是什么情况,压测逻辑不跑了还是进程不在了?

嗯,我先在自己的 skynet 分支上面测试。目前只是在 macos 上启用了 jemalloc,不确定有没有其他梗。

发现第一个问题,启动崩溃。原因是 snlua_init 里面调用 skynet_malloc 去申请的内存,实际调用的系统库的 malloc,但是在 dispatch_message 里面调用 skynet_free 去释放 msg->data 的时候,用的是 je_free。 ![image](https://github.com/user-attachments/assets/00497830-e457-412a-b961-e7d6cd2d84e8) ![image](https://github.com/user-attachments/assets/8682e875-a8ee-4dbc-90dc-82d2535da8e0) 分配和释放用的不同的分配器,所以崩溃。可参考:https://github.com/jemalloc/jemalloc/issues/2362 解决方案如下,但不太适合,这样全局的 malloc 劫持就失效了。 ```c #ifdef NOUSE_JEMALLOC #define skynet_malloc malloc #define skynet_calloc calloc #define skynet_realloc...

问题一已经修复,在 macos 上使用 DYLD_INTERPOSE 来调整 linker 的加载优先级。

新增问题二。发现有一些业务使用的时候,有一些 lua c 模块没有 include ,编译出来的 so 加载到 skynet 使用。在 so 里面调用 malloc 分配的内存,又调用 skynet.trash 去释放,这样也会导致分配和释放不对应。

I notice that the go binding use cgo to communicate with frida-core, can we use JNI as well?