Bug #2122
closedreproducible builds (lua)
0%
Description
While working on reproducible builds for openSUSE, I found that
our freeciv-3.2.5 package varied between builds from parts generated by tolua.
I attached a fix for main that allows bit-identical builds. Please review/merge.
Files
Updated by Marko Lindqvist 24 days ago
- Category set to General
- Target version set to 3.2.6
Updated by Marko Lindqvist 23 days ago
Do you have any idea of the root cause - why isn't the order (->tolua) deterministic and requires such "fixing"?
Updated by Bernhard M. Wiedemann 23 days ago
In lua and most other hash implementations, there is a random seed used for the hash indexing to mitigate an attack that sends elements crafted specifically to all hash into the same bucket which would DoS the software. The downside is that iteration order becomes as random as the seed.
So we need to sort when iterating to get stable ordering out.
And there was a date added.
Updated by Marko Lindqvist 22 days ago
- File 0045-tolua-Generate-deterministic-code.patch 0045-tolua-Generate-deterministic-code.patch added
- File 0023-tolua-Generate-deterministic-code.patch 0023-tolua-Generate-deterministic-code.patch added
- Status changed from New to In Review
- Assignee set to Marko Lindqvist
- Backported to S3_3 & S3_2
- On all branches, did an additional round of building tolua + generating toluabind.c with it, so that the generated file comes from the updated version (and tolua of that branch)
Updated by Marko Lindqvist 17 days ago
- Blocks Bug #2133: toluabind.c compile failure because of nullptr added