Memory errors under specific conditions #1818
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
I have this issue in js bindings in yoga-layout@3.2.1.
If we have a tree-like structure and call freeRecursive on a node, updating measure function on children will cause memory errors, depending on memory content it can be:
Here's a quick repro:
I understand that this is not a good to free memory and then try to use it again, but maybe we can add some checks in the js bindings code?
FinalizationRegistry
is getting to be well supported now: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/FinalizationRegistryI haven't been able to prioritize much work on Yoga or the JS bindings recently, but there is a series of refactoring that I think would dramatically improve perf and usability of the JS bindings:
Longer term, we can also rely on WASM ESM integration, to get out of the packaging shenanigans we have, where we currently bundle into a single JS file, that requires dynamic execution to eval (Emscripten started adding support recently https://github.com/emscripten-core/emscripten/pull/23985)