ccrma / chuck

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

stack overflow accessing vec3/vec4 fields #378

Closed gewang closed 11 months ago

gewang commented 11 months ago

discovered and reported by Kunwoo

vec3 pos;
for (0 => int i; i < 3000; i++)
{
    <<<getPos().x>>>;
}

fun vec3 getPos()
{
    return pos;
}

runtime exception

[chuck]:(EXCEPTION) StackOverflow in shred[id=1:b] [pc=0]
...(possible cause: shred operand stack exceeded)
gewang commented 11 months ago

issue due to incorrectly handled datatypes; fixed in 3e01ba5