Skip to content

Golem tool delta for gawk 5.4.1 - #1

Draft
noise64 wants to merge 7 commits into
gawk-5.4.1-tarballfrom
golem-gawk-tool
Draft

noise64 wants to merge 7 commits into
gawk-5.4.1-tarballfrom
golem-gawk-tool

Conversation

@noise64

@noise64 noise64 commented Nov 25, 2026 •

Copy link
Copy Markdown
Contributor
  • relates to GOL-1817
  • This PR holds the source delta that the Golem gawk tool applies to gawk 5.4.1. Until now the delta was a patch series applied at build time; this fork replaces that series.
  • The base branch gawk-5.4.1-tarball is upstream tag gawk-5.4.1 (52af7f1, https://git.savannah.gnu.org/git/gawk.git) plus one commit. That commit makes the tree equal to the signed release tarball gawk-5.4.1.tar.xz (sha256 07f6f7342b7febe4313fc2c2542ad93d64fe20ad8717200109f105a826f5fd37, good signature from Arnold Robbins, key D1967C63788713177D861ED7DF597815937EC0D2). The tarball has the same content as the tag in all common files; the commit removes 72 git-only files and adds the 5 generated doc/*.info files.
  • The commits in this PR, all for the wasm32-wasip2 build:
    • The first five commits are patches 0001 to 0005 of the earlier series, without change:
      • system() and output pipes use system/popen.
      • -D is refused.
      • A range check happens before the integer format cast, which removes its undefined behavior for out-of-range values. The upstream casts for * width/precision and %c are unchanged.
      • Two-way pipes go through a Golem command start.
      • /inet special files are refused.
      • pclose handles a two-way pipe whose read end is already closed.
    • The last commit makes -M/--bignum and --persist fail at startup with "not supported in this build" and exit status 2. Before this commit they only gave a warning, and the program continued.
  • All changes except the integer format fix are inside #ifdef __wasi__. The Golem wrapper code (I/O and time zone glue, the Rust tool crate) stays in golemcloud/golem.

Local checks

  • Build with WASI SDK 34.0 (standalone command, git archive of the commit, the same configure flags as the patch build). The commit before the last one gives a gawk.wasm byte-identical to the tarball-plus-patches build that the gawk qualification used (sha256 c34c55e4…6a66).
  • wasmtime run gawk.wasm (wasmtime 50.0.1) on this head: -M, --bignum, --persist and --persist=FILE give the fatal message and exit 2, -D exits 2, and BEGIN{print 1+1} prints 2. On the previous commit the four refused flags give only a warning and exit 0.
  • Not run on this head: the GNU test suite and the Golem gawk corpus. The last commit changes only the -M and --persist option cases, and the GNU MPFR and PMA tests run only on builds with that support.
  • GAWK_PERSIST_FILE in the environment still gives only a warning, as in native gawk without PMA.
  • This repository has no CI.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant