lua 64位转换问题

发布于 2024-09-24 03:49:24 字数 329 浏览 1 评论 0原文

我真的希望对这个主题有一些帮助。有人在需要同时支持 32 位和 64 位的应用程序中使用过 lua 吗?我们目前正在过渡到 64 位,但客户端编译的 lua 脚本遇到了问题,我们无法使用 64 位版本重新编译。因此,实际上我们需要能够在 64 位应用程序中加载使用 32 位 lua 编译的字节码文件。当我们尝试这样做时,我们收到一条错误消息:

virtual machine mismatch in test.bin.lua: size of size_t is 8 but read 4

当然,这是一个明显的 64 位转换问题。困难的是在无法重新编译二进制文件的情况下弄清楚该怎么做。

谢谢

I really hope there is some help to get on this subject. Has anyone ever used lua in an application that needs to have both 32-bit and 64-bit support? We are currently transitioning to 64-bit but are having trouble with client compiled lua scripts that we can't recompile ourselves using the 64-bit version. So in effect we need to be able to load bytecode files compiled using 32-bit lua in a 64-bit application. When we try to do so we receive an error message:

virtual machine mismatch in test.bin.lua: size of size_t is 8 but read 4

Well of course this is a clear 64bit transitioning problem. The hard thing is just to figure out what to do about it without the ability to recompile the binaries.

Thanks

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

找个人就嫁了吧 2024-10-01 03:49:24

修改 lundump.c 来​​读取 32 位字节码文件并不难。我已经在 Lua 邮件列表中发布了这方面的路线图。如果您有问题,请给我发送电子邮件。

It's not hard to adapt lundump.c to read 32-bit bytecode files. I've posted a roadmap for this in the Lua mailing list. If you have problems, please send me email.

素手挽清风 2024-10-01 03:49:24

你可以尝试LuaDec:“LuaDec是Lua语言的反编译器。”我不太了解它的网站声明它的目标是 Lua 5.0.2。因此,它可能无法开箱即用,但比从头开始要好。

You could try LuaDec: "LuaDec is a decompiler for the Lua language." I don't know much about it, and the website states that it targets Lua 5.0.2. So, it may not work out of the box, but it's better than starting from scratch.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文