Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

[GC] incorrect memory management for call_indirect builtin #2923

Copy link
Copy link
@HerrCai0907

Description

@HerrCai0907
Issue body actions

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

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    Morty Proxy This is a proxified and sanitized view of the page, visit original site.