Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make __wasi_linkcount_t 64-bit #70

Closed
sunfishcode opened this issue Jul 26, 2019 · 1 comment · Fixed by #127
Closed

Make __wasi_linkcount_t 64-bit #70

sunfishcode opened this issue Jul 26, 2019 · 1 comment · Fixed by #127
Labels
wasi-filesystem Issues targeted for a `wasi_unstable_filesystem` module

Comments

@sunfishcode
Copy link
Member

__wasi_countcount_t is currently a uint32_t. We should change it to uint64_t in order to support hypothetical filesystems with very large link counts. For comparison, the nlink function in Rust returns a 64-bit value.

This will increase the size of __wasi_filestat_t, however that seems negligible.

For comparison, the userspace nlink_t is already a uint64_t: https://github.com/rust-lang/libc/blob/master/src/wasi.rs#L34.

@sunfishcode sunfishcode added the wasi-filesystem Issues targeted for a `wasi_unstable_filesystem` module label Jul 26, 2019
@jedisct1
Copy link
Member

Good point. Yes, it would totally make sense to increase it to 64 bit.

sunfishcode pushed a commit that referenced this issue Oct 31, 2019
This commit changes the type for `__wasi_linkcount_t` to 64-bits to support
large link counts.

Fixes #70.
ibmibmibm added a commit to WasmEdge/WasmEdge that referenced this issue Dec 7, 2020
q82419 pushed a commit to WasmEdge/WasmEdge that referenced this issue Dec 7, 2020
hydai pushed a commit to WasmEdge/WasmEdge that referenced this issue Dec 7, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
wasi-filesystem Issues targeted for a `wasi_unstable_filesystem` module
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants