Skip to content

Distinguish different categories of errors#144

Merged
rossberg merged 4 commits intomasterfrom
errors
Oct 27, 2015
Merged

Distinguish different categories of errors#144
rossberg merged 4 commits intomasterfrom
errors

Conversation

@rossberg
Copy link
Member

This patch introduces different error exceptions to distinguish between static errors, traps, crashes, and assertion failures. It also does various other clean-ups around error handling.

Copy link
Member

Choose a reason for hiding this comment

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

Can you add a comment explaining the difference between a Trap and a Crash?

@rossberg
Copy link
Member Author

Addressed comments, PTAL.

Copy link
Contributor

Choose a reason for hiding this comment

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

Would it make sense to make error take (at, msg) as a tuple and a category string to simplify the exception handling pattern match below?

Copy link
Member Author

Choose a reason for hiding this comment

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

Could do that, but I don't think introducing a constructor indirection is worth it here. Makes all creation sites slightly more verbose and saves a little bit in this single place.

@rossberg-old
Copy link

Friendly ping.

Copy link
Member

Choose a reason for hiding this comment

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

"out of bounds" is a phrase we use to describe accesses that extend beyond the size. How about "memory size exceeded implementation limit"?

Copy link
Member Author

Choose a reason for hiding this comment

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

Good point, done.

@sunfishcode
Copy link
Member

lgtm, with one wording nit above.

@rossberg
Copy link
Member Author

Thanks! Wording nit addressed, merging.

rossberg added a commit that referenced this pull request Oct 27, 2015
Distinguish different categories of errors
@rossberg rossberg merged commit b065037 into master Oct 27, 2015
@rossberg rossberg deleted the errors branch October 27, 2015 14:56
Connicpu pushed a commit to Connicpu/wasm-spec that referenced this pull request May 11, 2020
As discussed in the CG on November 12, 2019 and in WebAssembly#144. Specifically,
all atomic accesses are now allowed to validate and execute normally
on unshared memories and wait operations trap when used with unshared
memories.

The PR updates Overview.md and makes a best-effort
attempt at updating the spec, making no changes when there is
already a TODO for updating spec text. It also adds new TODO comments
to the reference interpreter where changes will have to be made.
ngzhian pushed a commit to ngzhian/spec that referenced this pull request Nov 4, 2021
alexcrichton pushed a commit to WebAssembly/wide-arithmetic that referenced this pull request Sep 19, 2025
Editorial updates to Overview.md
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants