-
Notifications
You must be signed in to change notification settings - Fork 253
Closed
Description
I noticed that the code for the wasi_p1 backend now uses Error::from_neg_error_code(). WASI preview 1 error codes are unsigned 16-bit integers in the witx definition, though they are passed as signed 32-bit integers at the WASM level. The error values start at 1 and go up, so the code < 0 check transforms all errors into Error::UNEXPECTED. I confirmed this by calling getrandom from within a runtime that had a custom random_get import. I think this will need a separate constructor method, similar to Error::from_uefi_code().
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels