Skip to content
This repository has been archived by the owner on Feb 22, 2024. It is now read-only.

bug: memory leak risk in all tinygo/v0/examples #11

Closed
gaukas opened this issue Feb 7, 2024 · 1 comment
Closed

bug: memory leak risk in all tinygo/v0/examples #11

gaukas opened this issue Feb 7, 2024 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@gaukas
Copy link
Owner

gaukas commented Feb 7, 2024

Allocations occurred in the helper library tinygo/v0 has introduced risk of memory leak. While Go is a garbage-collected language, memory leak may only happen when we compile with tinygo and use -gc=leaking.

Although -gc=leaking is somewhat helpful at further reducing the size of a compiled artifact, it is important to note that anything failing the compilation with -gc=none (i.e., allocates on-heap memory) will subject to memory leak if compiled using -gc=leaking.

In this case, we should probably consider compiling current example WATMs with -gc=conservative (or -gc=precise).

@gaukas gaukas added the bug Something isn't working label Feb 7, 2024
@gaukas gaukas self-assigned this Feb 7, 2024
@gaukas
Copy link
Owner Author

gaukas commented Feb 8, 2024

Fixed in eae4ebe and ab7c0dd.

@gaukas gaukas closed this as completed Feb 8, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant