Skip to content

Lua 5.5 compatibility #265

Description

@thegushi

Lua 5.5 was released December 2025 and is now the current stable release. Lua 5.4 remains maintained but 5.3 and earlier are end-of-life. OpenDKIM currently blocks 5.5 at configure time (added in PR #264), but the C API changes required are modest.

Breaking C API changes and impact on OpenDKIM

Lua 5.5 change OpenDKIM affected?
lua_newstate takes a new 3rd seed parameter Yes — called in 5 places in opendkim-lua.c and once in miltertest.c. Compile error.
lua_dump changed stack behavior + extra writer call to signal end of dump Yes — called 5 times in opendkim-lua.c. Could cause subtle runtime bugs.
LUA_GCINC/LUA_GCGEN replaced by LUA_GCPARAM No — OpenDKIM does not touch GC params.
lua_resetthread deprecated No — not used.
lua_setcstacklimit deprecated No — not used.
lua_call nresults capped at 250 No — unlikely to hit in practice.
lua_pushvfstring now reports errors instead of raising them No — not used.

Work needed

  1. Add a 3rd NULL argument to all lua_newstate calls.
  2. Audit lua_dump usage in opendkim-lua.c — the extra end-of-dump writer call must not corrupt script serialization.
  3. Update configure.ac to detect Lua 5.5 and remove the LUA_VERSION_NUM >= 505 upper bound gate (added in PR configure.ac: Improve lua detection with/without pkg-config #264).

Metadata

Metadata

Assignees

No one assigned

    Labels

    needs-testingFlags things that have been fixed in develop

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions