mirror of
https://github.com/fluencelabs/wasmer
synced 2025-06-22 21:21:33 +00:00
Merge #1032
1032: Fix abort signature in emscripten ABI r=MarkMcCaskey a=MarkMcCaskey Needs tests; this is preventing python on wapm from working Co-authored-by: Mark McCaskey <mark@wasmer.io>
This commit is contained in:
@ -32,6 +32,7 @@ pub fn ___cxa_rethrow_primary_exception(_ctx: &mut Ctx, _a: u32) {
|
|||||||
/// TODO: We don't have support for exceptions yet
|
/// TODO: We don't have support for exceptions yet
|
||||||
pub fn ___cxa_throw(ctx: &mut Ctx, _ptr: u32, _ty: u32, _destructor: u32) {
|
pub fn ___cxa_throw(ctx: &mut Ctx, _ptr: u32, _ty: u32, _destructor: u32) {
|
||||||
debug!("emscripten::___cxa_throw");
|
debug!("emscripten::___cxa_throw");
|
||||||
|
eprintln!("Throwing exceptions not yet implemented: aborting!");
|
||||||
_abort(ctx);
|
_abort(ctx);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -731,7 +731,7 @@ pub fn generate_emscripten_env(globals: &mut EmscriptenGlobals) -> ImportObject
|
|||||||
"___syscall345" => func!(crate::syscalls::___syscall345),
|
"___syscall345" => func!(crate::syscalls::___syscall345),
|
||||||
|
|
||||||
// Process
|
// Process
|
||||||
"abort" => func!(crate::process::_abort),
|
"abort" => func!(crate::process::em_abort),
|
||||||
"_abort" => func!(crate::process::_abort),
|
"_abort" => func!(crate::process::_abort),
|
||||||
"_prctl" => func!(crate::process::_prctl),
|
"_prctl" => func!(crate::process::_prctl),
|
||||||
"abortStackOverflow" => func!(crate::process::abort_stack_overflow),
|
"abortStackOverflow" => func!(crate::process::abort_stack_overflow),
|
||||||
|
@ -13,6 +13,13 @@ pub fn abort_with_message(ctx: &mut Ctx, message: &str) {
|
|||||||
_abort(ctx);
|
_abort(ctx);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// The name of this call is `abort` but we want to avoid conflicts with libc::abort
|
||||||
|
pub fn em_abort(ctx: &mut Ctx, arg: u32) {
|
||||||
|
debug!("emscripten::abort");
|
||||||
|
eprintln!("Program aborted with value {}", arg);
|
||||||
|
_abort(ctx);
|
||||||
|
}
|
||||||
|
|
||||||
pub fn _abort(_ctx: &mut Ctx) {
|
pub fn _abort(_ctx: &mut Ctx) {
|
||||||
debug!("emscripten::_abort");
|
debug!("emscripten::_abort");
|
||||||
unsafe {
|
unsafe {
|
||||||
|
Reference in New Issue
Block a user