grame-cncm / faust

Functional programming language for signal processing and sound synthesis
http://faust.grame.fr
Other
2.59k stars 323 forks source link

Faust built with mingw64 segfaults #1035

Closed Spacechild1 closed 4 months ago

Spacechild1 commented 4 months ago

I've tried to build and install Faust from source with mingw64 (Msys2), but the resulting faust.exe segfaults.

Here's the backtrace from GDB:

#0  0x00007ff84d16de70 in ?? () from C:\msys64\mingw64\bin\libstdc++-6.dll
#1  0x00007ff733fe8b53 in void std::__cxx11::list<Garbageable*, std::allocator<Garbageable*> >::_M_i
nsert<Garbageable* const&>(std::_List_iterator<Garbageable*>, Garbageable* const&) ()
#2  0x00007ff733fe86b2 in std::__cxx11::list<Garbageable*, std::allocator<Garbageable*> >::push_fron
t(Garbageable* const&) ()
#3  0x00007ff733dcb818 in Garbageable::operator new(unsigned long long) ()
#4  0x00007ff733eb735c in Symbol::get(char const*) ()
#5  0x00007ff733f22558 in symbol(char const*) ()
#6  0x00007ff733f34efb in FaustAlgebra<itv::interval>::FaustAlgebra() ()
#7  0x00007ff733f5a9c8 in itv::interval_algebra::interval_algebra() ()
#8  0x00007ff733e59b46 in __static_initialization_and_destruction_0(int, int) ()
#9  0x00007ff733e59b73 in _GLOBAL__sub_I_gAlgebra ()
#10 0x00007ff733f0e142 in __do_global_ctors ()
    at C:/M/mingw-w64-crt-git/src/mingw-w64/mingw-w64-crt/crt/gccmain.c:44
#11 0x00007ff733f0e19f in __main ()
    at C:/M/mingw-w64-crt-git/src/mingw-w64/mingw-w64-crt/crt/gccmain.c:58
#12 0x00007ff733c312c8 in __tmainCRTStartup ()
    at C:/M/mingw-w64-crt-git/src/mingw-w64/mingw-w64-crt/crt/crtexe.c:266
#13 0x00007ff733c31406 in mainCRTStartup ()
    at C:/M/mingw-w64-crt-git/src/mingw-w64/mingw-w64-crt/crt/crtexe.c:193

Apparently, the segfault happens at static initialization time.

sletz commented 4 months ago

Are you using master-dev head? (there was a recent fix : https://github.com/grame-cncm/faust/commit/08cf4e905fbcec5a2cd454705f317aff87e9b7cb for a crash in a LTO context, but which seems similar to your crash), that is similar to: https://github.com/grame-cncm/faust/issues/1033

Spacechild1 commented 4 months ago

I was on the pd-multichannel branch. The current master-dev does work indeed! Thanks!

sletz commented 4 months ago

pd-multichannel has just been rebased on master-dev and pushed (--force), so should be usable also.