The ubsan triggers:
UBSAN: Undefined behaviour in programs/ld-collate.c:1557:7 variable length array bound evaluates to non-positive value 0
nrules is guaranteed to be at most sizeof (((struct element_t *)
0)->used_in_level) * 8, so use it instead.
The multibyte case is easy. We simply sort into an array with
256 elements. */
struct locale_collate_t *collate = locale->categories[LC_COLLATE].collate;
- int mbact[nrules];
+ int mbact[sizeof (((struct element_t *)0)->used_in_level) * 8];
int wcact;
int mbseqact;
int wcseqact;