Skip to content

Add knobs to limit memories/tables in a Store#2617

Merged
fitzgen merged 1 commit into
bytecodealliance:mainfrom
alexcrichton:limit-tables-and-memeories
Jan 28, 2021
Merged

Add knobs to limit memories/tables in a Store#2617
fitzgen merged 1 commit into
bytecodealliance:mainfrom
alexcrichton:limit-tables-and-memeories

Conversation

@alexcrichton
Copy link
Copy Markdown
Member

Fuzzing has turned up that module linking can create large amounts of
tables and memories in addition to instances. For example if N instances
are allowed and M tables are allowed per-instance, then currently
wasmtime allows MxN tables (which is quite a lot). This is causing some
wasm-smith-generated modules to exceed resource limits while fuzzing!

This commits adds corresponding max_tables and max_memories
functions to sit alongside the max_instances configuration.
Additionally fuzzing now by default configures all of these to a
somewhat low value to avoid too much resource usage while fuzzing.

Fuzzing has turned up that module linking can create large amounts of
tables and memories in addition to instances. For example if N instances
are allowed and M tables are allowed per-instance, then currently
wasmtime allows MxN tables (which is quite a lot). This is causing some
wasm-smith-generated modules to exceed resource limits while fuzzing!

This commits adds corresponding `max_tables` and `max_memories`
functions to sit alongside the `max_instances` configuration.
Additionally fuzzing now by default configures all of these to a
somewhat low value to avoid too much resource usage while fuzzing.
@github-actions github-actions Bot added fuzzing Issues related to our fuzzing infrastructure wasmtime:api Related to the API of the `wasmtime` crate itself labels Jan 28, 2021
@github-actions
Copy link
Copy Markdown

Subscribe to Label Action

cc @fitzgen, @peterhuene

Details This issue or pull request has been labeled: "fuzzing", "wasmtime:api"

Thus the following users have been cc'd because of the following labels:

  • fitzgen: fuzzing
  • peterhuene: wasmtime:api

To subscribe or unsubscribe from this label, edit the .github/subscribe-to-label.json configuration file.

Learn more.

Copy link
Copy Markdown
Member

@fitzgen fitzgen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice :)

@fitzgen fitzgen merged commit be1ac15 into bytecodealliance:main Jan 28, 2021
@alexcrichton alexcrichton deleted the limit-tables-and-memeories branch September 9, 2021 15:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

fuzzing Issues related to our fuzzing infrastructure wasmtime:api Related to the API of the `wasmtime` crate itself

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants