-
-
Notifications
You must be signed in to change notification settings - Fork 240
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fatal error: Check failed: result.second. #1124
Comments
I believe this is related to:
because empty rust vectors are not actually allocated: let mut a = (vec![] as Vec<u8>);
let mut b = (vec![] as Vec<u8>);
println!("{:?}", a.as_mut_ptr());
println!("{:?}", b.as_mut_ptr()); prints |
After thinking about it for a while, I think this problem is hard to avoid at the NAPI-RS. Empty |
So when building with |
It should panic in debug mode, |
I get a native crash when returning an empty buffer for the second time:
Using
and then
This appears to also be broken when using the legacy mode (and also in napi-rs 1).
The text was updated successfully, but these errors were encountered: