Skip to content

fix: make fd_tell and path_filestat_get WASI stubs abort instead of silently returning success#20904

Open
johnathan79717 wants to merge 1 commit intomerge-train/barretenbergfrom
jh/fix-wasi-stubs
Open

fix: make fd_tell and path_filestat_get WASI stubs abort instead of silently returning success#20904
johnathan79717 wants to merge 1 commit intomerge-train/barretenbergfrom
jh/fix-wasi-stubs

Conversation

@johnathan79717
Copy link
Contributor

Summary

Two WASI stubs in wasi_stubs.cpp were silently returning success (0) without doing the right thing. This is the same class of issue as the environ_sizes_get fix in #20902.

  • fd_tell: was returning success without writing to the output pointer. Since barretenberg never calls ftell(), it now aborts like the other unimplemented stubs.
  • path_filestat_get: was silently returning success without writing the filestat output struct. Since barretenberg has no filesystem support, it now aborts like the other unimplemented filesystem stubs (path_filestat_set_times, path_link, etc.).

Closes AztecProtocol/barretenberg#1648

fd_tell was returning success without writing to the output offset pointer,
leaving callers with stale data. Write 0 to the pointer instead.

path_filestat_get was silently returning success without writing the filestat
struct. Since barretenberg never intentionally calls stat(), abort like the
other unimplemented filesystem stubs.

Closes AztecProtocol/barretenberg#1648
@johnathan79717 johnathan79717 changed the title fix: correct fd_tell and path_filestat_get WASI stubs fix: make fd_tell and path_filestat_get WASI stubs abort instead of silently returning success Feb 26, 2026
@johnathan79717 johnathan79717 added the ci-full Run all master checks. label Feb 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci-full Run all master checks.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant