ccrma / chuck

ChucK Music Programming Language
http://chuck.stanford.edu/
GNU General Public License v2.0
803 stars 128 forks source link

incorrect stack reference cleanup #374

Closed gewang closed 10 months ago

gewang commented 11 months ago
class Foo
{
    5 => int x;
}

class Bar
{
    Foo foo;
    fun Foo getFoo() { return foo; }
}

Bar bar;
// prints 1
<<< bar.foo >>>;
// possible bug
bar.getFoo() @=> Foo @ foo; // the presence of @=> leads to a missing Release_Object instruction
// prints 3, should be 2
<<< bar.foo >>>;
gewang commented 10 months ago

addressed in 35ad803 as part of dangling object references tracking and cleanup