Compiling beast as follows crashes the resampler.
```
# disable ASAN spam to stderr about leaks
export ASAN_OPTIONS=detect_leaks=0
# build with address sanitizer
make default MODE=asan
make clean
make -j11
make check
```

Note that there's a mismatch in order indexing and allocation in 
bseresampler.cc in several places:

```
# 418
fir_compute_sse_taps (const vector<float>& taps)
{
  const int order = taps.size();
  vector<float> sse_taps ((order + 6) / 4 * 16);
# 470
     AlignedArray<float,16> random_mem (order + 4);
      for (uint i = 0; i < order + 4; i++)
        random_mem[i] = 1.0 - rand() / (0.5 * RAND_MAX);
# 362
fir_process_4samples_sse (const float *input,
// ...
  for (uint i = 1; i < (order + 6) / 4; i++)
  {
    out0_v.v=_mm_add_ps(out0_v.v, _mm_mul_ps(input_v[i].v, 
sse_taps_v[i*4+0].v));
```

In the above snippet, `input_v == random_mem`. It is allocated as order+4 and 
indexed as order+6.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/tim-janik/beast/issues/138
_______________________________________________
beast mailing list
[email protected]
https://mail.gnome.org/mailman/listinfo/beast

Reply via email to