Skip to content
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

app heap insertion issues #2275

Open
yamt opened this issue Jun 8, 2023 · 0 comments
Open

app heap insertion issues #2275

yamt opened this issue Jun 8, 2023 · 0 comments

Comments

@yamt
Copy link
Collaborator

yamt commented Jun 8, 2023

memory_instantiate() sometimes tries to adjust __heap_base.
however,

  • in the first place, it doesn't make sense to adjust the value of the global because apps/libs use the underlying symbol (&__heap_end), not the exported global. i suppose it's impossible to move the symbol.
  • the adjustment is broken in interpreter/jit runtime because wasm_instantiate() calls memory_instantiate() before initializing the globals. (otoh, it works for aot runtime because it uses a different initialization order for some reasons.)
  • the recent LLVM provides __heap_end. if we adjust __heap_base, i suppose we should adjust __heap_end as well.

the only workaround i can think of right now is to disable app heap. (--heap-size=0)

yamt added a commit to yamt/wasm-micro-runtime that referenced this issue Jun 8, 2023
yamt added a commit to yamt/wasm-micro-runtime that referenced this issue Jun 9, 2023
yamt added a commit to yamt/wasm-micro-runtime that referenced this issue Jun 13, 2023
yamt added a commit to yamt/wasm-micro-runtime that referenced this issue Jul 6, 2023
* it's rare to require app heap with wasi

* it's even harmful in some cases
  cf. bytecodealliance#2275

* i'm a bit tired to type "--heap-size=0"
wenyongh pushed a commit that referenced this issue Jul 7, 2023
It's rare to require app heap with wasi and sometimes harmful in some cases:
#2275
victoryang00 pushed a commit to victoryang00/wamr-aot-gc-checkpoint-restore that referenced this issue May 27, 2024
…ce#2346)

It's rare to require app heap with wasi and sometimes harmful in some cases:
bytecodealliance#2275
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant