Project

General

Profile

Actions

Bug #2122

closed

reproducible builds (lua)

Added by Bernhard M. Wiedemann 2 months ago. Updated about 2 months ago.

Status:
Closed
Priority:
Normal
Category:
General
Target version:
Start date:
08/06/2026
Due date:
% Done:

0%

Estimated time:

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


Related issues 1 (0 open — 1 closed)

Blocks Bug #2133: toluabind.c compile failure because of nullptrClosedMarko Lindqvist08/13/2026

Actions
Actions #1

Updated by Marko Lindqvist 2 months ago

  • Category set to General
  • Target version set to 3.2.6
Actions #2

Updated by Marko Lindqvist 2 months ago

Do you have any idea of the root cause - why isn't the order (->tolua) deterministic and requires such "fixing"?

Actions #3

Updated by Bernhard M. Wiedemann 2 months 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 2 months ago

- 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)

Actions #5

Updated by Marko Lindqvist 2 months ago

  • Blocks Bug #2133: toluabind.c compile failure because of nullptr added
Actions #6

Updated by Marko Lindqvist 2 months ago

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.

Actions #7

Updated by Marko Lindqvist about 2 months ago

  • Status changed from In Review to Closed
Actions

Also available in: Atom PDF