Skip to content

write_to_port of a value larger than the WasmSequencer's serialOutMax traps on wasm but succeeds on fpybc #226

Description

@zimri-leisher

The WasmSequencer copies serial writes through a buffer of serialOutMax bytes (256 in the harness) and traps a longer payload with BufferTooLarge, while the FpySequencer sends any size straight from its stack. The limit is a WasmSequencer::configure value that is not in the dictionary, so the compiler has no way to check it today.

x: Svc.SeqArgs = Svc.SeqArgs()
write_to_port(Svc.Fpy.SerialPortIndex.EXAMPLE_PORT_0, x)   # 263 bytes: fpybc ok, wasm traps

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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