Open
Description
Hi,
using MKL and SVMLight, there are two different kinds of memory errors. (Context: Modelselection)
1.) Using interleaved optimization in MKL, there is a NULL-pointer error because SVMLight tries to read its W array which is NULL
2.) Using non-interleaved optimization in MKL, there is an illegal write into the alpha array. The lines
float64_t* alpha = SG_MALLOC(float64_t, totdoc);
for (i=0; i<totdoc; i++)
alpha[i]=0;
for (i=0; i<get_num_support_vectors(); i++)
alpha[get_support_vector(i)]=get_alpha(i);
are responsible: totdoc which is the number of int labels, is sometimes a different number than get_num_support_vectors(), in the case of the write error: smaller, so the index grows over the array bounds.
I'll try to put the code that reproduces this somewhere....