Add Trap::trap_code (#2309)

* add Trap::trap_code

* Add non-exhaustive wasmtime::TrapCode

* wasmtime: Better document TrapCode

* move and refactor test
This commit is contained in:
Leonardo Yvens
2020-10-27 18:30:45 -03:00
committed by GitHub
parent f6d5b8772c
commit bde9555793
4 changed files with 141 additions and 27 deletions

View File

@@ -12,9 +12,6 @@ use serde::{Deserialize, Serialize};
#[cfg_attr(feature = "enable-serde", derive(Serialize, Deserialize))]
pub enum TrapCode {
/// The current stack space was exhausted.
///
/// On some platforms, a stack overflow may also be indicated by a segmentation fault from the
/// stack guard page.
StackOverflow,
/// A `heap_addr` instruction detected an out-of-bounds error.