The rest of cairo (and therefore most external packages that depend
on cairo) doesn't make any use of liblzo.
Signed-off-by: Simon McVittie <smcv@debian.org>
Using `meson test` is the Meson equivalent of `make check`, and is the
way developers of other Meson-built projects will generally expect to
run tests. In particular, it encapsulates which of the tests want to be
run from which directories, removing the need for the Gitlab-CI
integration to know this.
Signed-off-by: Simon McVittie <smcv@debian.org>
Checking that public header files #include "cairo.h" first (or none)
Checking that private header files #include "some cairo header" first (or none)
Checking that source files #include "cairoint.h" first (or none)
./win32/cairo-dwrite-font-public.c:#include "cairo-win32-private.h"
Checking that there is no #include <cairo.*.h>
./win32/cairo-dwrite-font-public.c: * #include <cairo-win32.h>
Checking that feature conditionals are used with #if only (not #ifdef)
This adds a missing cairoint.h include and makes
check-preprocessor-syntax.sh slightly better in not warning about
includes in C comments.
Signed-off-by: Uli Schlachter <psychon@znc.in>
The autofoo build is on its way out and I am too lazy to properly
integrate these scripts with the meson build. Thus, this commit just
adds them to one single CI build. At least those that can relatively
easily be made to work. The others are left as comments.
Signed-off-by: Uli Schlachter <psychon@znc.in>
This wasn't previously marked as private because it was initially
static inline, and only became extern later.
Fixes: 9ffbf63d "fix warning: inlining failed in call to '_csi_stack_push'"
Resolves: https://gitlab.freedesktop.org/cairo/cairo/-/issues/580
Signed-off-by: Simon McVittie <smcv@debian.org>
cairo-trutype-subset.c would blindly trust a font saying that its name
list has thousands of entries. This commit changes find_name() to also
get the size of the input memory region and to do some bounds checking
on its memory accesses.
Fixes: https://gitlab.freedesktop.org/cairo/cairo/-/issues/579
Signed-off-by: Uli Schlachter <psychon@znc.in>
A user font glyph containing a font can cause deadlock in
_cairo_scaled_glyph_fini due to the destroy recording surface while
holding _cairo_scaled_glyph_page_cache_mutex. When the font in the
recording surface is removed from the page cache it will attempt to
also acquire the _cairo_scaled_glyph_page_cache_mutex resulting in
deadlock.
Instead of destroying the recording surface in
_cairo_scaled_glyph_page_cache_mutex, move it to an array in the
scaled font and destroy it after the
_cairo_scaled_glyph_page_cache_mutex is released.
Fixes the font in user font case in #440
When cairo_scaled_glyph_page_cache needs to remove entries,
cairo-cache calls _cairo_hash_table_random_entry() with the predicate
_cairo_scaled_glyph_page_can_remove(). This function checks that the
glyph_page scaled_font is not locked by testing
scaled_font->cache_frozen. The scaled font is locked in the
cache-cache destroy entry callback: _cairo_scaled_glyph_page_pluck().
There is a race condition here between testing
scaled_font->cache_frozen and locking the font. Fix this by adding a
new CAIRO_MUTEX_TRY_LOCK mutex operation, and using it to test and
lock the scaled font in _cairo_scaled_glyph_page_can_remove().
Fixes the multithreaded case in #440