View Issue Details

IDProjectCategoryView StatusLast Update
0008175Multi Theft Auto : San AndreasServerpublic2014-07-30 23:26
ReporterUnixAssigned Toccw 
PrioritynormalSeveritymajorReproducibilityalways
Status resolvedResolutionfixed 
PlatformLinuxOSDebian 64-bitOS Version
Product Version 
Target Version1.4.1Fixed in Version1.4.1 
Summary0008175: LUA bad header in precompiled chunk (64-bit)
Description

Compiled scripts don't work in the Linix server 64bit version, you need to have a 64-bit LUA compiler for them to work (i believe).

I believe it is because of memory sizes (data types)?

Steps To Reproduce

Compile a script
Load it through Linux 64-bit

Additional Information

Haven't tried Windows 64-bit, but most likely the same.

TagsNo tags attached.

Relationships

has duplicate 0008398 closed New issues bad header in precompiled chunk 

Activities

Unix

2014-04-14 21:07

viewer   ~~0020672

Forgot to mention, they work fine in MTA 1.3.5.

arranTuna

2014-04-14 21:35

manager   ~~0020673

What, you compile server side lua files?

Unix

2014-04-14 21:40

viewer   ~~0020674

Some maps that get uploaded by players include compiled serverside lua files.

arranTuna

2014-04-14 21:58

manager   ~~0020675

Then I don't see how that's fixable because even if there was a 64 bit option in luac.mtasa.com those resources wouldn't be compiled in 64 bit and why would you even trust an encrypted server side lua file it could contain a command to give themselves money, weapons, etc and you wouldn't even know about it.

I don't see the problem as being in the MTA 64 bit server, but the person who made encrypted server side lua files.

sbx320

2014-04-14 22:03

administrator   ~~0020676

size_t differs in size for the x64 platform, similar to the issue with md5. Someone should evaluate the possible consequences of forcing sizeof(size_t) == 4 which might allow us to run x86 lua bytecode under x64 Linux.

Unix

2014-04-14 22:07

viewer   ~~0020677

We run serverside scripts clientside with our race script with some overriding/re-writing, however other race servers (and non-race servers) could also come across this (I added this during testing 1.4 - after reading the 1.4 thread).

einheit-101

2014-04-14 23:08

reporter   ~~0020679

There was something in the MTA changelog with "disabled compiled scripts" 2 weeks ago. Maybe that`s the problem.

ixjf

2014-04-14 23:10

viewer   ~~0020680

That was an April fools' day joke - the only thing that was done was the removal of some debug messages.

Woovie

2014-04-14 23:10

manager   ~~0020681

#1 that was an April Fools joke.
#2 If you don't understand the issue, please don't bother replying.

Arran, gamemodes like MTA DayZ have both server and client compiled files for example.

mickdermack

2014-04-15 02:35

viewer   ~~0020683

Last edited: 2014-07-30 19:38

View 4 revisions

Request for comments on this patch:
http://cker.li/patches/mta/lundump_mod2.patch
It enables Lua scripts compiled on a platform with a different size_t to be loaded and executed. Should a string be longer than what can be expressed with the current platform's size_t, which is 4 GB on a 32-bit platform, it will fail gracefully.
Possible bugs:
Won't work on big-endian platforms if the size of size_t differs from the compiled script (anyone want to run an MTA server on ARM-BE, MIPS-BE, PowerPC-BE, or SPARC?).
Won't be able to correctly handle sizes of size_ts which are not a multiple of a byte (does anyone even know of such a system?).

EDIT: Updated patch. Still requesting comments.

ccw

2014-07-30 23:26

administrator   ~~0021544

Fixed in https://code.google.com/p/mtasa-blue/source/detail?r=6748

Thanks a lot for the patch. It was good but too flexible for MTA's current needs, so I removed some bits before committing.

Issue History

Date Modified Username Field Change