Skip to content
This repository was archived by the owner on Nov 3, 2021. It is now read-only.
This repository was archived by the owner on Nov 3, 2021. It is now read-only.

Meaning of out-of-range zero-length 'memory.fill' / 'memory.copy' #11

Closed

Description

@julian-seward1

What should happen when memory.fill/.copy are requested to process zero bytes, but the destination and/or source offsets are out of range? Should there be an out-of-range exception? Or should the operations be no-ops?

I'd vote for throwing an exception, on safety/correctness grounds.

Activity

  1. jfbastien commented on Apr 25, 2018

    @jfbastien
    Member

    I would advocate for the same behavior as for data segments. There was pretty extensive discussion here: WebAssembly/design#897

  2. rossberg commented on Apr 25, 2018

    @rossberg
    Member

    @jfbastien, seconded. That would imply that these instructions trap when either source or destination end offset is out of bounds. That would match @julian-seward1's preference as well.

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