Skip to content

Fix stat symlink inode on WASI Preview 2 and 3 - #914

Merged
alexcrichton merged 1 commit into
WebAssembly:mainfrom
macovedj:fix-stat-symlink-inode
Nov 16, 2026
Merged

alexcrichton merged 1 commit into
WebAssembly:mainfrom
macovedj:fix-stat-symlink-inode

Conversation

@macovedj

Copy link
Copy Markdown
Contributor

On wasip2 and wasip3, stat() follows a symlink but reports the symlink's inode instead of the target's. The inode lookup uses flag | AT_SYMLINK_NOFOLLOW, which is always nonzero, so it never follows the link. Use & to check whether the caller requested no-follow behavior.

@alexcrichton alexcrichton left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@alexcrichton
alexcrichton enabled auto-merge (squash) November 16, 2026 17:51
@alexcrichton
alexcrichton merged commit 44ab759 into WebAssembly:main Nov 16, 2026
72 of 74 checks passed
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.

2 participants