All backends actually crash. Read again:

======
In Faust, the interval calculation system on signals is supposed to detect 
possible problematic computations at compile time, and refuse to compile the 
corresponding DSP code. But since the interval calculation is currently quite 
imperfect, it can misbehave and generate prossible problematic code, that will 
possibly misbehave at runtime. The typical case is when producing indexes to 
access rdtable/rwtable or delay lines, that may trigger memory access crashes 
as explained before.
======

Stéphane 


> Le 19 avr. 2021 à 19:44, Kjetil Matheussen <k.s.matheus...@gmail.com> a écrit 
> :
> 
> Thank you. But should the interpreter crash though?
> 
> This program does not crash:
> 
>  import("stdfaust.lib");
>  process = 1000 / hslider("divPitch", 10, 0, 10, 0.01);
> 
> While this one does crash:
> 
>  import("stdfaust.lib");
>  process = os.osc(1000 / hslider("divPitch", 10, 0, 10, 0.01));
> 
> 
> Thread 14 "Runner" received signal SIGSEGV, Segmentation fault.
> [Switching to Thread 0x7fff768f6700 (LWP 18030)]
> 0x0000000002f3a11c in FBCInterpreter<float,
> 0>::ExecuteBlock(FBCBlockInstruction<float>*, bool) ()
> (gdb) bt
> #0  0x0000000002f3a11c in FBCInterpreter<float,
> 0>::ExecuteBlock(FBCBlockInstruction<float>*, bool) ()
> #1  0x0000000002eeaa90 in interpreter_dsp_aux<float, 0>::compute(int,
> float**, float**) ()
> #2  0x0000000002579661 in RT_process_effect2 (outputs=0x7fff768f3540,
> inputs=0x7fff768f23c0, num_frames=64, time=<optimized out>,
> data=0x6220002dd900)
>    at audio/Faust_plugins_template2.cpp:547
> 
> 
> 
> 
> 
> 
> On Mon, Apr 19, 2021 at 7:24 PM Stéphane Letz <l...@grame.fr> wrote:
>> 
>> This is a the kind of problematic code that the compiler does not correctly 
>> handle in a perfect way. More info here: 
>> https://faustdoc.grame.fr/manual/faq/#produced-nan-or-infinity-values-and-table-access
>> 
>> Stéphane
>> 
>>> Le 19 avr. 2021 à 19:10, Kjetil Matheussen <k.s.matheus...@gmail.com> a 
>>> écrit :
>>> 
>>> Hi,
>>> 
>>> I don't know if this is a bug in the compiler, the interpreter
>>> backend, or the faust code itself, but the interpreter backend crashes
>>> when it runs this code:
>>> 
>>> import("stdfaust.lib");
>>> divPitch = hslider("divPitch", 10, 0, 10, 0.01);
>>> enable5 = button("enable2");
>>> process = os.osc(1000 / divPitch) * enable5 <: _,_;
>>> 
>>> ...and the "divPitch" slider is set to 0.
>>> (I got this code anonymously through the Radium crash reporter.)
>>> 
>>> I think it's a bug in the compiler though since it refuse to compile this 
>>> code:
>>> 
>>> process = 1000 / 0.0;
>>> 
>>> 
>>> _______________________________________________
>>> Faudiostream-users mailing list
>>> Faudiostream-users@lists.sourceforge.net
>>> https://lists.sourceforge.net/lists/listinfo/faudiostream-users
>> 



_______________________________________________
Faudiostream-users mailing list
Faudiostream-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/faudiostream-users

Reply via email to