The error came from a misuse of gsl_ran_shuffle just before the call of gsl_permute_char, with a bride corresponding to the data I want to shuffle (uchar), instead of a bride corresponding to the permutation itself (size_t) :