async function f(v) {
    if (v == 3) {
        return;
    }

    stages.push(`f>${v}`);

    await "X";

    f(v + 1);

    stages.push(`f<${v}`);
}
Referencing memory after it has been freed can cause a program to crash, use unexpected values, or execute code.