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
Something we have experienced in libbpfgo is that it's not hard to accidentally double-free resources (see this bug we recently hit parca-dev/parca-agent#367 that ASAN catches parca-dev/parca-agent#370), which beyond crashes, could have other implications.
Perhaps this could be avoided by having more checks in place to keep track of which resources are 'closed' or not. This would make the code less clean and maintainable and it won't be bulletproof 😢.
Just wanted to kickstart the discussion here, in case this is something any of you are interested in!
Thanks for opening this @javierhonduco and having a resource reference/usage status flag (or similar) sounds interesting indeed (not to close fds and/or double frees).
Something we have experienced in libbpfgo is that it's not hard to accidentally double-free resources (see this bug we recently hit parca-dev/parca-agent#367 that ASAN catches parca-dev/parca-agent#370), which beyond crashes, could have other implications.
Perhaps this could be avoided by having more checks in place to keep track of which resources are 'closed' or not. This would make the code less clean and maintainable and it won't be bulletproof 😢.
Just wanted to kickstart the discussion here, in case this is something any of you are interested in!
cc/ @rafaeldtinoco
The text was updated successfully, but these errors were encountered: