Skip to content

fd_fdstat_get returns invalid fs_flags #283

Description

@TerrorJack

According to

buf->fs_flags = r;
, fd_fdstat_get would return fs_flags directly from fcntl() call on a POSIX host. However, there's no translation logic to generate the fd flags that conform to https://github.com/WebAssembly/wasi-libc/blob/a05277a6803d99dc5f8d5c250a02cf37ff90882a/libc-bottom-half/headers/public/wasi/api.h#L896, so it's highly likely that an invalid fs_flags is passed to wasm code.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions