View Issue Details

IDProjectCategoryView StatusLast Update
0003823Spring engineLuapublic2013-06-01 18:57
Reporterabma Assigned Toabma  
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionfixed 
Target Version95.0 
Summary0003823: LuaBitOps.cpp contains some uncommented stuff (weirdness)
Descriptionhttps://github.com/spring/spring/blob/develop/rts/Lua/LuaBitOps.cpp#L11

and it uses for all operations unsigned int & masks all results to 0x00FFFFFF.
Additional Informationcan the patch be applied?

imo the mask is only there to make all results >0
TagsNo tags attached.
Attached Files
0001-simplify-math.bit_-allow-32-bit.patch (Attachment missing)
Checked infolog.txt for Errors

Activities

abma

2013-06-01 18:02

administrator   ~0010800

http://springrts.com/phpbb/viewtopic.php?f=12&t=30545

Kloot

2013-06-01 18:20

developer   ~0010801

Last edited: 2013-06-01 18:22

"imo the mask is only there to make all results >0"

wrong...

1) spring's lua vm uses FLOATS as its number type which can only represent integer values up to 1<<24 exactly

2) lua_pushinteger IS THE SAME AS lua_pushnumber except with an explicit rather than an implicit cast

imo people without extensive low-level engine knowledge should just not touch these areas under any circumstance... sorry but it's simply too vulnerable

abma

2013-06-01 18:57

administrator   ~0010802

>imo people without extensive low-level engine knowledge should just not touch these areas...

this is why i asked here :)

Issue History

Date Modified Username Field Change
2013-06-01 17:18 abma New Issue
2013-06-01 17:18 abma File Added: 0001-simplify-math.bit_-allow-32-bit.patch
2013-06-01 17:18 abma Status new => feedback
2013-06-01 18:02 abma Note Added: 0010800
2013-06-01 18:02 abma Status feedback => new
2013-06-01 18:20 Kloot Note Added: 0010801
2013-06-01 18:22 Kloot Note Edited: 0010801
2013-06-01 18:46 abma Changeset attached => spring develop a5ee0f9d
2013-06-01 18:46 abma Assigned To => abma
2013-06-01 18:46 abma Status new => resolved
2013-06-01 18:46 abma Resolution open => fixed
2013-06-01 18:57 abma Note Added: 0010802