Skip to content
This repository was archived by the owner on Oct 21, 2022. It is now read-only.
This repository was archived by the owner on Oct 21, 2022. It is now read-only.

bufferred_read blows stack #320

@stevemk14ebr

Description

@stevemk14ebr

Hello, the routine here:

let mut buf = [0u8; $buffer_size];

is often called with a size of about 0x4000. In embedded environments this can be over what's a reasonable stack size, and can cause the stack to blow. Even in a non-embedded environment this is a pretty big stack buffer, though it's not going to be an issue in usermode as there's usually a few MB of stack available.

This is currently hidden behind a crate flag reduced-stack-buffer to use a smaller default stack size. I suggest this be made the default. This flag is not being exposed in wasmi so users of that library cannot control this.

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