Skip to content

v1.19.8 - three races a second writer could win now refuse or keep its change

Choose a tag to compare

@github-actions github-actions released this 21 Nov 00:22
· 43 commits to main since this release
v1.19.8
23de26e

Three races a second writer could win now refuse or keep its change

Fixed

  • writeguard-restore --out could create its copy at a link that took the output name just before the create, because Windows follows the link. It now creates the file through one handle, checks that the name still names that file, and only then writes. A name that changed is refused, and no snapshot byte is written. On Windows the window between the check and the create narrows but does not close: a dangling link planted there can still get an empty file created at its target. A refusal can leave an empty file at the name: on a volume that reports no file ids, --out refuses, saying the volume cannot prove the file, and an empty file may remain at that name. — test: scripts/lib/cli.test.mjs
  • configure picked where to write from a check made before it read the config. A config that appeared at the other name in between received the edit, which the loader does not read first, and the run reported success. Now the write follows what the read found, and, when the read found no project config, a config that appears while configure runs is refused (nothing written, exit 1) or reported as not applied (exit 1), never as success. Between the last check and the rename, a config can still be replaced at the name the write uses, and the run then reports success. — test: scripts/configure.test.mjs
  • A CLI state edit (restore, return-leave, dig-gauge) could overwrite a crossing or spawn count that a hook saved while the command ran. Now it saves only the fields it changed, and only where no other writer has changed them since it read the state. A field that another writer and the command both change within the last few milliseconds of the save still takes the command's value. The save's merge base is a re-read of the same file the command loaded, never an older copy beside it. When another writer changed a field this command changes, the kept value stands and the command says its change was not applied, instead of reporting success. If the save's re-read fails, or finds no state record owned by this project, the command saves the state it loaded whole, as before 1.19.8, so another writer's field saved in that window is not kept. — test: scripts/lib/caliper.test.mjs (lab F1, lab F1 (b))