You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The functions in libvoikko.rs do a lot of stuff with ffi::{CStr, CString} and use .unwrap() while doing it. .unwrap() will panic on error, which can cause stack unwinding. Stack unwinding across the FFI boundary causes undefined behavior.
So, these results need to be actually checked and the results propagated in a controlled way. Maybe we need to introduce something like a StringError in the voikko module, unless we want to return something like Result<String, ffi::IntoStringError> across our API...
The text was updated successfully, but these errors were encountered:
The functions in
libvoikko.rs
do a lot of stuff withffi::{CStr, CString}
and use.unwrap()
while doing it..unwrap()
will panic on error, which can cause stack unwinding. Stack unwinding across the FFI boundary causes undefined behavior.So, these results need to be actually checked and the results propagated in a controlled way. Maybe we need to introduce something like a
StringError
in thevoikko
module, unless we want to return something likeResult<String, ffi::IntoStringError>
across our API...The text was updated successfully, but these errors were encountered: