gtk: Align key_size up to key_align
authorMatt Turner <mattst88@gmail.com>
Mon, 19 Jun 2023 19:50:04 +0000 (15:50 -0400)
committerMatt Turner <mattst88@gmail.com>
Mon, 19 Jun 2023 19:55:09 +0000 (15:55 -0400)
commit3f360aa883dc51ad986c721be01b494020e5ac9d
tree13a2e136adae17bcb51b9bb852ba70b05564248b
parenta4440453868ebe7c87d0a69de9609b33a688a8bb
gtk: Align key_size up to key_align

Avoids unaligned accesses when e.g. the key_size is 12 and key_align is
8. We need to round the key size up to 16 to ensure that all keys are
appropriately aligned.

This manifested as a failure in the `gtk:gtk / sorter` unit test on
sparc.

Closes: https://gitlab.gnome.org/GNOME/gtk/-/issues/5907
gtk/gtkmultisorter.c
gtk/gtksortlistmodel.c