ccrma / chuck

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

crash when adding OTF shred #367

Closed gewang closed 1 year ago

gewang commented 1 year ago

Test.ck

public class Test {
    function void test(){
        <<< "TEST" >>>;
    }
}

Test1.ck

Test t;
t.test();

run:

terminal1> ./chuck Test.ck --loop
terminal2> ./chuck + Test1.ck

terminal1>
free(): double free detected in tcache 2
Abort (core dumped)

(reproduced on linux)

thanks to @celestebetancur for discovering and narrowing down the issue!

gewang commented 1 year ago

issue due to a double fclose() on a file descriptor in otf_process_msg()fd passed to compiler with incorrect autoClose flag (resolution: fc85e1e)