Bug #2122
closed
reproducible builds (lua)
Added by Bernhard M. Wiedemann 24 days ago.
Updated 11 days ago.
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
- Category set to General
- Target version set to 3.2.6
Do you have any idea of the root cause - why isn't the order (->tolua) deterministic and requires such "fixing"?
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.
- 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)
- Blocks Bug #2133: toluabind.c compile failure because of nullptr added
Marko Lindqvist wrote in #note-4:
did an additional round of building tolua + generating toluabind.c with it
And that breaks some CI jobs with this patch, because of #2133.
I think we need to go with Bernhard's original patch in main.
- Status changed from In Review to Closed
Also available in: Atom
PDF