Skip to content

Ensure XRenderInfo pointers are appropriately aligned

While runnig some X11 applications on an Arm Morello platform I noticed bus errors inside xrender. XRenderInfo uses a single malloc call to allocate multiple objects in one single allocation and places those objects directly after the XRenderInfo object. However, these calculations do not ensure that this objects are sufficiently aligned. I noticed this because on Morello (and other CHERI-enabled architectures) pointers need to be strongly aligned. Instead of allocating a single block with potentially misaligned subsequent objects, this change uses seprate allocations for the four arrays.

This is an alternative to !12 (closed)

Signed-off-by: Alex Richardson arichardson@FreeBSD.org

Merge request reports