[cairo-commit] 3 commits - .gitlab-ci.yml src/cairo-ft-font.c src/cairo-xlib-render-compositor.c

Bryce Harrington bryce at kemper.freedesktop.org
Thu Mar 8 21:30:28 UTC 2018


 .gitlab-ci.yml                     |   46 +++++++++++++++++++++++++++++++++++++
 src/cairo-ft-font.c                |    3 ++
 src/cairo-xlib-render-compositor.c |    3 ++
 3 files changed, 52 insertions(+)

New commits:
commit 5454b85d4bf2f7bea454c940d90255a15517fa3b
Author: Massimo <sixtysix at inwind.it>
Date:   Wed Mar 7 14:11:58 2018 -0600

    bfo#91271 - Fix access of uninitialized memory
    
    Valgrind reports that xlib-render-compositor's composite_traps()
    accesses uninitialized memory when traps->num_traps == 0.
    
    This happens in the line that says
    
          if (xtraps[0].left.p1.y < xtraps[0].left.p2.y) {
    
    after the 'for' loop.  We can actually return early if there are no
    trapezoids to render.
    
    Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=91271
    Reviewed-by: Bryce Harrington <bryce at osg.samsung.com>

diff --git a/src/cairo-xlib-render-compositor.c b/src/cairo-xlib-render-compositor.c
index 4352b44c1..4b75109e0 100644
--- a/src/cairo-xlib-render-compositor.c
+++ b/src/cairo-xlib-render-compositor.c
@@ -1830,6 +1830,9 @@ composite_traps (void			*abstract_dst,
 
     //X_DEBUG ((display->display, "composite_trapezoids (dst=%x)", (unsigned int) dst->drawable));
 
+    if (traps->num_traps == 0)
+	return CAIRO_STATUS_SUCCESS;
+
     if (dst->base.is_clear &&
 	(op == CAIRO_OPERATOR_OVER || op == CAIRO_OPERATOR_ADD))
     {
commit 45e3b8f27179cf1130bfa61a09ef366fd313a0e1
Author: Federico Mena Quintero <federico at gnome.org>
Date:   Tue Feb 13 15:04:42 2018 -0600

    bfo#105084 - Initialize memory properly in _cairo_ft_font_face_create_for_pattern()
    
    The font_face->ft_options field was not being initialized, leading to
    an invalid free().
    
    Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=105084
    Reviewed-by: Bryce Harrington <bryce at osg.samsung.com>

diff --git a/src/cairo-ft-font.c b/src/cairo-ft-font.c
index 3c911cf39..79aef78f5 100644
--- a/src/cairo-ft-font.c
+++ b/src/cairo-ft-font.c
@@ -3254,6 +3254,9 @@ _cairo_ft_font_face_create_for_pattern (FcPattern *pattern)
     }
 
     font_face->unscaled = NULL;
+
+    _get_pattern_ft_options (pattern, &font_face->ft_options);
+
     font_face->next = NULL;
 
     font_face->pattern = FcPatternDuplicate (pattern);
commit 7784757b9e271f749b91de27b3472a0151ae2380
Author: Federico Mena Quintero <federico at gnome.org>
Date:   Tue Feb 27 17:54:57 2018 -0600

    Add .gitlab-ci.yml to run the tests automatically

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
new file mode 100644
index 000000000..d75ce02a9
--- /dev/null
+++ b/.gitlab-ci.yml
@@ -0,0 +1,46 @@
+# -*- indent-tabs-mode: nil -*-
+
+variables:
+  # Docker images for various distros and architectures
+
+  AMD64_FEDORA_LATEST:       "registry.gitlab.com/alatiera/librsvg-oci-images/amd64/fedora:latest"
+  AMD64_OPENSUSE_TUMBLEWEED: "registry.gitlab.com/alatiera/librsvg-oci-images/amd64/opensuse:tumbleweed"
+  AMD64_DEBIAN_TESTING:      "registry.gitlab.com/alatiera/librsvg-oci-images/amd64/debian:testing"
+
+  I386_DEBIAN_TESTING:       "registry.gitlab.com/alatiera/librsvg-oci-images/i386/debian:testing"
+
+stages:
+  - test
+
+.test_template: &distro_test
+  before_script:
+    # CCache Config
+    - mkdir -p ccache
+    - export CCACHE_BASEDIR=${PWD}
+    - export CCACHE_DIR=${PWD}/ccache
+    - export CC="ccache gcc"
+
+  script:
+    - ./autogen.sh
+    - make check TARGETS=image NUM_THREADS=8
+
+  artifacts:
+    when: on_failure
+    paths:
+      - test/*.log
+      - test/pdiff/*.log
+      - test/output
+
+  cache:
+    # Each job will have it's own cache
+    key: "$CI_JOB_NAME"
+    paths:
+      - ccache/
+
+# TEST STAGE
+########################################################################
+
+fedora:test:
+  image: $AMD64_FEDORA_LATEST
+  stage: test
+  <<: *distro_test


More information about the cairo-commit mailing list