You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There is a bug in Consensus.cpp. At line 129 you create an object of type cluster_result as follows:
cluster_result Z(N-1);
Now when there is only one point in the vector 'points' the expressoin N-1 is 0, and the array inside object Z, (which is also named Z) is initialized with length 0.
Later in Consensus.cpp at line 145 MST_linkage_core(N,D,Z)
is called, and inside this function Z2.append(0, idx2, min);
is called, where Z2 is the parameter Z.
Z2.append() then accesses Z[pos] with pos=0 (and smashes the stack for me), since the array has a length of 0 dereferencing it leads to undefined behaviour.
Using cluster_result Z(N); fixed it for me.
Best regards,
Christian
The text was updated successfully, but these errors were encountered:
Hello!
There is a bug in Consensus.cpp. At line 129 you create an object of type cluster_result as follows:
cluster_result Z(N-1);
Now when there is only one point in the vector 'points' the expressoin N-1 is 0, and the array inside object Z, (which is also named Z) is initialized with length 0.
Later in Consensus.cpp at line 145
MST_linkage_core(N,D,Z)
is called, and inside this function
Z2.append(0, idx2, min);
is called, where Z2 is the parameter Z.
Z2.append() then accesses Z[pos] with pos=0 (and smashes the stack for me), since the array has a length of 0 dereferencing it leads to undefined behaviour.
Using
cluster_result Z(N);
fixed it for me.Best regards,
Christian
The text was updated successfully, but these errors were encountered: