Memory bugs
NAPI-RS had a use after free bug, when calling async functions with vector of references (Vec<&Element>
) as an argument. This issue was reported and then fixed, but the changes were applied to NAPI-RS in version 3 only. This means, that at this moment we still are using version containing this bug.
The possible appearances of this issue are:
memory allocation of ??? bytes failed
thread 'tokio-runtime-worker' panicked at library/alloc/src/slice.rs:161:25:
capacity overflow
Currently, we tried worked around this issue, by trying to stop concurrency, but this appeared to only reduce the probability of the issue appearing.
We can avoid this issue entirely, by not using Vec<&Element>
in async functions (example of those changes were introduced in #183)