-
Notifications
You must be signed in to change notification settings - Fork 257
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
compiler: fix compiledModule leak #1608
Conversation
Fixes #1600. Signed-off-by: Nuno Cruces <[email protected]>
This is obviously not the fix, but we clearly need to do more than #1535. |
Signed-off-by: Achille Roussel <[email protected]>
I pushed a commit as a suggestion for a slightly different approach, but please feel free to revert or change it if we think this isn't the right approach. The Go runtime cannot guarantee that finalizers will be run in the presence of cyclic references between objects, so I added an indirection layer to break the cycle between I've used a modified version of |
Signed-off-by: Nuno Cruces <[email protected]>
Signed-off-by: Nuno Cruces <[email protected]>
Any ideas on what to do about the failing test? |
Signed-off-by: Achille Roussel <[email protected]>
… from compiledModule Signed-off-by: Achille Roussel <[email protected]>
Signed-off-by: Achille Roussel <[email protected]>
excellent collaboration 🥇 |
Signed-off-by: Achille Roussel <[email protected]>
kudos to @ncruces and @achille-roussel |
Fixes #1600.
I'm not 100% sure why this is needed, but it's being done as well in:
wazero/internal/engine/compiler/engine.go
Lines 495 to 508 in 1f8c908
Somehow, not doing this prevents the
releaseCompiledModule
finalizer from running.