Skip to content

ml-proto and design disagree on grow_memory semantics #714

Closed

Description

@sunfishcode

The design repo says that grow_memory should return -1 on allocation failure and does not mention the possibility of trapping:
https://github.com/WebAssembly/design/blob/master/AstSemantics.md#resizing

ml-proto's implementation for grow_memory traps on overflow when converting from pages to bytes, or if the size exceeds an internal implementation limit and does not appear to have code for returning -1 on allocation failure:
https://github.com/WebAssembly/spec/blob/master/ml-proto/spec/eval.ml#L288
https://github.com/WebAssembly/spec/blob/master/ml-proto/spec/memory.ml#L71

Activity

  1. added this to the MVP milestone on Jun 27, 2016
  2. sunfishcode commented on Jul 12, 2016

    @sunfishcode
    MemberAuthor

    This appears to be an ml-proto issue rather than a design issue, so I've now opened WebAssembly/spec#307.

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

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions