[cairo-bugs] [Bug 27683] New: [bisected] many cairo can't run caused by some modification on big endian

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Fri Apr 16 00:18:35 PDT 2010


           Summary: [bisected] many cairo can't run caused by some
                    modification on big endian
           Product: cairo
           Version: 1.9.7
          Platform: x86 (IA32)
        OS/Version: Linux (All)
            Status: NEW
          Severity: major
          Priority: high
         Component: general
        AssignedTo: cworth at cworth.org
        ReportedBy: jian.j.zhao at intel.com
         QAContact: cairo-bugs at cairographics.org

Created an attachment (id=35080)
 --> (https://bugs.freedesktop.org/attachment.cgi?id=35080)

System Environment:
Libdrm:         (master)3506173ba7e726a9d0a17ec42734a925a885b01e
Mesa:           (master)eee220d65d3d37030f33971b02823c614e3eb618
Xserver:                (master)7b6517526631a65891b806bca30be8f49955d0a8
Xf86_video_intel:       (master)324a2810da3fbae35637ba9080f31f9383db0868
Cairo:          (master)4142f0836d6719dd136a5fc6ac1adaddd681a3f2
Kernel: (drm-intel-next)7f8a85698f5c8a981641ec0bdf9926768786db9d

Bug detailed description:
There are many cairo cases run with error of "Out of Memory" on all the
backends(including null, image and xlib). And I find it was caused by a commit
of cairo on master "Fix script scanner endianness". The culprit commit is
55ce0b774869e9fa614c6f9fec7905f7205cb5ff. And if I apply the following patch,
it works well. 

diff --git a/util/cairo-script/cairo-script-scanner.c
index 24d1616..b1e612d 100644
--- a/util/cairo-script/cairo-script-scanner.c
+++ b/util/cairo-script/cairo-script-scanner.c
@@ -653,7 +653,7 @@ base85_end (csi_t *ctx, csi_scanner_t *scan, cairo_bool_t

     if (deflate) {
-        uLongf len = be32 (*(uint32_t *) scan->buffer.base);
+        uLongf len =  (*(uint32_t *) scan->buffer.base);
        Bytef *source = (Bytef *) (scan->buffer.base + sizeof (uint32_t));

        status = csi_string_deflate_new (ctx, &obj,

commit 55ce0b774869e9fa614c6f9fec7905f7205cb5ff
Author: Andrea Canciani <ranma42 at gmail.com>
Date:   Fri Feb 5 22:30:05 2010 +0100

    script: Fix script scanner endianness

    The script interpreter was reading the length of compressed data as
    an host-endian uint32_t, thus making cairo-script able to correctly
    read traces that were produced on the same endianness as the one they
    ran upon, but unsuitable for portabile cairo-scripts.

    Reviewed-by: Chris Wilson <chris at chris-wilson.co.uk>

Reproduce steps:
1. xinit&
2. ./cairo-perf-trace evolution.trace

Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.

More information about the cairo-bugs mailing list