Let $X$ be an algebraic smooth curve of genus $g$ over $\mathbb C$, and let $\mathcal M_X(r,d)$ (resp $\mathcal M_X^0(r)$) be the moduli space of vector bundle of rank $r$ and degree $d$ (resp. with trivial determinant) over $X$, we know that when $g=r=2$ and $d\equiv 0 \mod 2$ this space is smooth. So we ignore this case.
My question, as you knew from the title, is: What is the dimension of the singular locus of this moduli spaces?
Reference will be appreciated! thanks