简体   繁体   English

lua 64位转换问题

[英]lua 64-bit transitioning issue

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? 有没有人曾经在需要同时支持32位和64位的应用程序中使用过lua? 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. 我们目前正在转换到64位,但是客户端编译的lua脚本遇到问题,我们无法使用64位版本重新编译。 So in effect we need to be able to load bytecode files compiled using 32-bit lua in a 64-bit application. 所以实际上我们需要能够在64位应用程序中加载使用32位lua编译的字节码文件。 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 test.bin.lua中的虚拟机不匹配:size_t的大小为8但读取为4

Well of course this is a clear 64bit transitioning problem. 当然,这是一个明确的64位转换问题。 The hard thing is just to figure out what to do about it without the ability to recompile the binaries. 如果没有重新编译二进制文件的能力,那么困难的只是弄清楚如何处理它。

Thanks 谢谢

It's not hard to adapt lundump.c to read 32-bit bytecode files. 使lundump.c适应读取32位字节码文件并不困难。 I've posted a roadmap for this in the Lua mailing list. 我已经在Lua邮件列表中发布了这个路线图。 If you have problems, please send me email. 如果您有问题,请给我发电子邮件。

You could try LuaDec: "LuaDec is a decompiler for the Lua language." 你可以试试LuaDec:“LuaDec是Lua语言的反编译器。” I don't know much about it, and the website states that it targets Lua 5.0.2. 我不太了解它,该网站声称它的目标是Lua 5.0.2。 So, it may not work out of the box, but it's better than starting from scratch. 因此,它可能无法开箱即用,但它比从头开始更好。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM