mirror of
https://salsa.debian.org/xorg-team/lib/pixman
synced 2025-09-01 02:10:49 +00:00

This test program allocates an array of 16 * 7 uint32_ts and spawns 16 threads that each use 7 of the allocated uint32_ts as a destination image for a large number of composite operations. Each thread then computes and returns a checksum for the image. Finally, the main thread computes a checksum of the checksums and verifies that it matches expectations. The purpose of this test is catch errors where memory outside images is read and then written back. Such out-of-bounds accesses are broken when multiple threads are involved, because the threads will race to read and write the shared memory. V2: - Incorporate fixes from Siarhei for endianness and undefined behavior regarding argument evaluation - Make the images 7 pixels wide since the bug only happens when the composite width is greater than 4. - Compute a checksum of the checksums so that you don't have to update 16 values if something changes. V3: Remove stray dollar sign
14 lines
508 B
Makefile
14 lines
508 B
Makefile
include $(top_srcdir)/test/Makefile.sources
|
|
|
|
AM_CFLAGS = $(OPENMP_CFLAGS) $(PTHREAD_CFLAGS)
|
|
AM_LDFLAGS = $(OPENMP_CFLAGS) $(TESTPROGS_EXTRA_LDFLAGS) $(PTHREAD_LDFLAGS)
|
|
LDADD = libutils.la $(top_builddir)/pixman/libpixman-1.la -lm $(PNG_LIBS) $(PTHREAD_LIBS)
|
|
AM_CPPFLAGS = -I$(top_srcdir)/pixman -I$(top_builddir)/pixman $(PNG_CFLAGS)
|
|
|
|
libutils_la_SOURCES = $(libutils_sources) $(libutils_headers)
|
|
|
|
noinst_LTLIBRARIES = libutils.la
|
|
noinst_PROGRAMS = $(TESTPROGRAMS) $(OTHERPROGRAMS)
|
|
|
|
TESTS = $(TESTPROGRAMS)
|