Skip to content

[GC] incorrect memory management for call_indirect builtin #2923

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

Closed
HerrCai0907 opened this issue May 28, 2025 · 0 comments · Fixed by #2924
Closed

[GC] incorrect memory management for call_indirect builtin #2923

HerrCai0907 opened this issue May 28, 2025 · 0 comments · Fixed by #2924
Assignees
Labels

Comments

@HerrCai0907
Copy link
Member

HerrCai0907 commented May 28, 2025

Bug description

call_indirect does not handle its arguments which are GC managed object

Steps to reproduce

class A {
  v: i32 = 10;
}

class B {
  v: i32 = 20;
}

function foo(a: A): void {
  __collect(); // force trigger GC
  let b = new B();
  trace("foo", 1, a.v);
}

export function _start(): void {
  call_indirect(foo.index, new A());
}
foo 20

AssemblyScript version

all

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant