Two issues with librsvg

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Two issues with librsvg

Oren Ben-Kiki
My main issue is that librsvg seems to not find sub elements by id.
Specifically, rsvg_handle_has_sub returns false, and therefore querying for
the element's size and position fails. I'm probably doing something wrong
here... or is this a bug? I really want the ability to access sub-elements
size and position (by id or name or something along these lines), so any
advice/workaround to make this work would be appreciated.

The secondary issue is that librsvg causes memory leaks, or at least causes
valgrind to think there is such a leak. I can easily work around this with
a suppression file, but... Is there some additional cleanup function I
should call to release all allocated memory?

As you can see in the output (below), I am using version 2.40.13, if that
matters.

Here is the tiny test program:

--- cheese.cpp ---
#include <iostream>
#include <rsvg.h>

using namespace std;

static const char s_svg[] = R"EOF(
<svg>
<rect id='cheese' x='10' y='20' width='300' height='40'/>
</svg>
)EOF";

int main() {
    cerr << "RSVG VERSION: " << LIBRSVG_VERSION << endl;

    RsvgHandle* rsvg = rsvg_handle_new();
    GError* error = nullptr;
    if (!rsvg_handle_write(rsvg,
                           reinterpret_cast<const guchar*>(s_svg),
                           sizeof(s_svg) - 1,
                           &error)) {
        cerr << "Oops: " << error->message << endl;
        g_error_free(error);
    } else if (rsvg_handle_has_sub(rsvg, "cheese")) {
        cerr << "YUMMY CHEESE!" << endl;
    } else {
        cerr << "WHERE IS MY CHEESE?" << endl;
    }
    g_object_unref(rsvg);
    return 0;
}
--- cheese.cpp ---

And a tinier shell script running it:

--- cheese.sh ---
#!/bin/sh
set -x
g++ \
    -std=c++14 \
    -isystem /usr/include/librsvg-2.0/librsvg \
    -isystem /usr/include/glib-2.0 \
    -isystem /usr/lib/x86_64-linux-gnu/glib-2.0/include \
    -isystem /usr/include/gdk-pixbuf-2.0 \
    -isystem /usr/include/cairo \
    -o cheese \
    cheese.cpp \
    -lrsvg-2 \
    -lglib-2.0 \
    -lgobject-2.0
valgrind --leak-check=full --track-origins=yes ./cheese
--- cheese.sh ---

The results are longer:

--- cheese.out ---
+ g++ -std=c++14 -isystem /usr/include/librsvg-2.0/librsvg -isystem
/usr/include/glib-2.0 -isystem /usr/lib/x86_64-linux-gnu/glib-2.0/include
-isystem /usr/include/gdk-pixbuf-2.0 -isystem /usr/include/cairo -o cheese
cheese.cpp -lrsvg-2 -lglib-2.0 -lgobject-2.0
+ valgrind --leak-check=full --track-origins=yes ./cheese
==20434== Memcheck, a memory error detector
==20434== Copyright (C) 2002-2015, and GNU GPL'd, by Julian Seward et al.
==20434== Using Valgrind-3.11.0 and LibVEX; rerun with -h for copyright info
==20434== Command: ./cheese
==20434==
RSVG VERSION: 2.40.13
WHERE IS MY CHEESE?
==20434==
==20434== HEAP SUMMARY:
==20434==     in use at exit: 149,205 bytes in 361 blocks
==20434==   total heap usage: 522 allocs, 161 frees, 170,579 bytes allocated
==20434==
==20434== 8 bytes in 1 blocks are possibly lost in loss record 17 of 349
==20434==    at 0x4C2DB8F: malloc (in
/usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==20434==    by 0x4C2FDEF: realloc (in
/usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==20434==    by 0x50C07D7: g_realloc (in
/lib/x86_64-linux-gnu/libglib-2.0.so.0.4800.2)
==20434==    by 0x53AE9D8: ??? (in
/usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.4800.2)
==20434==    by 0x53B42CC: g_type_register_static (in
/usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.4800.2)
==20434==    by 0x53B4694: g_type_register_static_simple (in
/usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.4800.2)
==20434==    by 0x4E653F3: rsvg_handle_get_type (in
/usr/lib/x86_64-linux-gnu/librsvg-2.so.2.40.13)
==20434==    by 0x4E658B5: rsvg_handle_new (in
/usr/lib/x86_64-linux-gnu/librsvg-2.so.2.40.13)
==20434==    by 0x400B8B: main (in /home/oren/cheese)
==20434==
==20434== 8 bytes in 1 blocks are possibly lost in loss record 18 of 349
==20434==    at 0x4C2DB8F: malloc (in
/usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==20434==    by 0x4C2FDEF: realloc (in
/usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==20434==    by 0x50C07D7: g_realloc (in
/lib/x86_64-linux-gnu/libglib-2.0.so.0.4800.2)
==20434==    by 0x53AE9D8: ??? (in
/usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.4800.2)
==20434==    by 0x53B42CC: g_type_register_static (in
/usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.4800.2)
==20434==    by 0x539353D: g_flags_register_static (in
/usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.4800.2)
==20434==    by 0x4E616A6: rsvg_handle_flags_get_type (in
/usr/lib/x86_64-linux-gnu/librsvg-2.so.2.40.13)
==20434==    by 0x4E64FD3: ??? (in
/usr/lib/x86_64-linux-gnu/librsvg-2.so.2.40.13)
==20434==    by 0x53B222C: g_type_class_ref (in
/usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.4800.2)
==20434==    by 0x5398DAC: g_object_newv (in
/usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.4800.2)
==20434==    by 0x5399533: g_object_new (in
/usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.4800.2)
==20434==    by 0x4E658C9: rsvg_handle_new (in
/usr/lib/x86_64-linux-gnu/librsvg-2.so.2.40.13)
==20434==
==20434== 16 bytes in 1 blocks are possibly lost in loss record 124 of 349
==20434==    at 0x4C2FB55: calloc (in
/usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==20434==    by 0x50C0770: g_malloc0 (in
/lib/x86_64-linux-gnu/libglib-2.0.so.0.4800.2)
==20434==    by 0x53AF522: ??? (in
/usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.4800.2)
==20434==    by 0x53B3F90: g_type_register_fundamental (in
/usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.4800.2)
==20434==    by 0x539330B: ??? (in
/usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.4800.2)
==20434==    by 0x538D177: ??? (in
/usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.4800.2)
==20434==    by 0x40106B9: call_init.part.0 (dl-init.c:72)
==20434==    by 0x40107CA: call_init (dl-init.c:30)
==20434==    by 0x40107CA: _dl_init (dl-init.c:120)
==20434==    by 0x4000C69: ??? (in /lib/x86_64-linux-gnu/ld-2.23.so)
==20434==
==20434== 16 bytes in 1 blocks are possibly lost in loss record 125 of 349
==20434==    at 0x4C2DB8F: malloc (in
/usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==20434==    by 0x4C2FDEF: realloc (in
/usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==20434==    by 0x50C07D7: g_realloc (in
/lib/x86_64-linux-gnu/libglib-2.0.so.0.4800.2)
==20434==    by 0x53AF406: ??? (in
/usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.4800.2)
==20434==    by 0x53B3F90: g_type_register_fundamental (in
/usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.4800.2)
==20434==    by 0x539330B: ??? (in
/usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.4800.2)
==20434==    by 0x538D177: ??? (in
/usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.4800.2)
==20434==    by 0x40106B9: call_init.part.0 (dl-init.c:72)
==20434==    by 0x40107CA: call_init (dl-init.c:30)
==20434==    by 0x40107CA: _dl_init (dl-init.c:120)
==20434==    by 0x4000C69: ??? (in /lib/x86_64-linux-gnu/ld-2.23.so)
==20434==
==20434== 16 bytes in 1 blocks are possibly lost in loss record 126 of 349
==20434==    at 0x4C2FB55: calloc (in
/usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==20434==    by 0x50C0770: g_malloc0 (in
/lib/x86_64-linux-gnu/libglib-2.0.so.0.4800.2)
==20434==    by 0x53AF522: ??? (in
/usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.4800.2)
==20434==    by 0x53B3F90: g_type_register_fundamental (in
/usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.4800.2)
==20434==    by 0x5393371: ??? (in
/usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.4800.2)
==20434==    by 0x538D177: ??? (in
/usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.4800.2)
==20434==    by 0x40106B9: call_init.part.0 (dl-init.c:72)
==20434==    by 0x40107CA: call_init (dl-init.c:30)
==20434==    by 0x40107CA: _dl_init (dl-init.c:120)
==20434==    by 0x4000C69: ??? (in /lib/x86_64-linux-gnu/ld-2.23.so)
==20434==
==20434== 16 bytes in 1 blocks are possibly lost in loss record 127 of 349
==20434==    at 0x4C2DB8F: malloc (in
/usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==20434==    by 0x4C2FDEF: realloc (in
/usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==20434==    by 0x50C07D7: g_realloc (in
/lib/x86_64-linux-gnu/libglib-2.0.so.0.4800.2)
==20434==    by 0x53AF406: ??? (in
/usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.4800.2)
==20434==    by 0x53B3F90: g_type_register_fundamental (in
/usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.4800.2)
==20434==    by 0x5393371: ??? (in
/usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.4800.2)
==20434==    by 0x538D177: ??? (in
/usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.4800.2)
==20434==    by 0x40106B9: call_init.part.0 (dl-init.c:72)
==20434==    by 0x40107CA: call_init (dl-init.c:30)
==20434==    by 0x40107CA: _dl_init (dl-init.c:120)
==20434==    by 0x4000C69: ??? (in /lib/x86_64-linux-gnu/ld-2.23.so)
==20434==
==20434== 16 bytes in 1 blocks are possibly lost in loss record 128 of 349
==20434==    at 0x4C2FB55: calloc (in
/usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==20434==    by 0x50C0770: g_malloc0 (in
/lib/x86_64-linux-gnu/libglib-2.0.so.0.4800.2)
==20434==    by 0x53AF522: ??? (in
/usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.4800.2)
==20434==    by 0x53B3F90: g_type_register_fundamental (in
/usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.4800.2)
==20434==    by 0x539CB04: ??? (in
/usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.4800.2)
==20434==    by 0x538D181: ??? (in
/usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.4800.2)
==20434==    by 0x40106B9: call_init.part.0 (dl-init.c:72)
==20434==    by 0x40107CA: call_init (dl-init.c:30)
==20434==    by 0x40107CA: _dl_init (dl-init.c:120)
==20434==    by 0x4000C69: ??? (in /lib/x86_64-linux-gnu/ld-2.23.so)
==20434==
==20434== 16 bytes in 1 blocks are possibly lost in loss record 129 of 349
==20434==    at 0x4C2DB8F: malloc (in
/usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==20434==    by 0x4C2FDEF: realloc (in
/usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==20434==    by 0x50C07D7: g_realloc (in
/lib/x86_64-linux-gnu/libglib-2.0.so.0.4800.2)
==20434==    by 0x53AF406: ??? (in
/usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.4800.2)
==20434==    by 0x53B3F90: g_type_register_fundamental (in
/usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.4800.2)
==20434==    by 0x539CB04: ??? (in
/usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.4800.2)
==20434==    by 0x538D181: ??? (in
/usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.4800.2)
==20434==    by 0x40106B9: call_init.part.0 (dl-init.c:72)
==20434==    by 0x40107CA: call_init (dl-init.c:30)
==20434==    by 0x40107CA: _dl_init (dl-init.c:120)
==20434==    by 0x4000C69: ??? (in /lib/x86_64-linux-gnu/ld-2.23.so)
==20434==
==20434== 16 bytes in 1 blocks are possibly lost in loss record 130 of 349
==20434==    at 0x4C2FB55: calloc (in
/usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==20434==    by 0x50C0770: g_malloc0 (in
/lib/x86_64-linux-gnu/libglib-2.0.so.0.4800.2)
==20434==    by 0x53AF522: ??? (in
/usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.4800.2)
==20434==    by 0x53B3F90: g_type_register_fundamental (in
/usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.4800.2)
==20434==    by 0x5397C1B: ??? (in
/usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.4800.2)
==20434==    by 0x538D186: ??? (in
/usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.4800.2)
==20434==    by 0x40106B9: call_init.part.0 (dl-init.c:72)
==20434==    by 0x40107CA: call_init (dl-init.c:30)
==20434==    by 0x40107CA: _dl_init (dl-init.c:120)
==20434==    by 0x4000C69: ??? (in /lib/x86_64-linux-gnu/ld-2.23.so)
==20434==
==20434== 16 bytes in 1 blocks are possibly lost in loss record 131 of 349
==20434==    at 0x4C2DB8F: malloc (in
/usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==20434==    by 0x4C2FDEF: realloc (in
/usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==20434==    by 0x50C07D7: g_realloc (in
/lib/x86_64-linux-gnu/libglib-2.0.so.0.4800.2)
==20434==    by 0x53AF406: ??? (in
/usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.4800.2)
==20434==    by 0x53B3F90: g_type_register_fundamental (in
/usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.4800.2)
==20434==    by 0x5397C1B: ??? (in
/usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.4800.2)
==20434==    by 0x538D186: ??? (in
/usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.4800.2)
==20434==    by 0x40106B9: call_init.part.0 (dl-init.c:72)
==20434==    by 0x40107CA: call_init (dl-init.c:30)
==20434==    by 0x40107CA: _dl_init (dl-init.c:120)
==20434==    by 0x4000C69: ??? (in /lib/x86_64-linux-gnu/ld-2.23.so)
==20434==
==20434== 24 bytes in 1 blocks are possibly lost in loss record 141 of 349
==20434==    at 0x4C2FB55: calloc (in
/usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==20434==    by 0x50C0770: g_malloc0 (in
/lib/x86_64-linux-gnu/libglib-2.0.so.0.4800.2)
==20434==    by 0x53B23B5: g_type_class_ref (in
/usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.4800.2)
==20434==    by 0x53B1E2C: g_type_class_ref (in
/usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.4800.2)
==20434==    by 0x53A1147: g_param_spec_flags (in
/usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.4800.2)
==20434==    by 0x4E64FEF: ??? (in
/usr/lib/x86_64-linux-gnu/librsvg-2.so.2.40.13)
==20434==    by 0x53B222C: g_type_class_ref (in
/usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.4800.2)
==20434==    by 0x5398DAC: g_object_newv (in
/usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.4800.2)
==20434==    by 0x5399533: g_object_new (in
/usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.4800.2)
==20434==    by 0x4E658C9: rsvg_handle_new (in
/usr/lib/x86_64-linux-gnu/librsvg-2.so.2.40.13)
==20434==    by 0x400B8B: main (in /home/oren/cheese)
==20434==
==20434== 80 bytes in 1 blocks are possibly lost in loss record 241 of 349
==20434==    at 0x4C2FB55: calloc (in
/usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==20434==    by 0x50C0770: g_malloc0 (in
/lib/x86_64-linux-gnu/libglib-2.0.so.0.4800.2)
==20434==    by 0x53B23B5: g_type_class_ref (in
/usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.4800.2)
==20434==    by 0x53B1E2C: g_type_class_ref (in
/usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.4800.2)
==20434==    by 0x53B5247: g_type_create_instance (in
/usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.4800.2)
==20434==    by 0x539CF5F: g_param_spec_internal (in
/usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.4800.2)
==20434==    by 0x53A11A0: g_param_spec_flags (in
/usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.4800.2)
==20434==    by 0x4E64FEF: ??? (in
/usr/lib/x86_64-linux-gnu/librsvg-2.so.2.40.13)
==20434==    by 0x53B222C: g_type_class_ref (in
/usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.4800.2)
==20434==    by 0x5398DAC: g_object_newv (in
/usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.4800.2)
==20434==    by 0x5399533: g_object_new (in
/usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.4800.2)
==20434==    by 0x4E658C9: rsvg_handle_new (in
/usr/lib/x86_64-linux-gnu/librsvg-2.so.2.40.13)
==20434==
==20434== 96 bytes in 1 blocks are possibly lost in loss record 299 of 349
==20434==    at 0x4C2FB55: calloc (in
/usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==20434==    by 0x50C0770: g_malloc0 (in
/lib/x86_64-linux-gnu/libglib-2.0.so.0.4800.2)
==20434==    by 0x53AEA59: ??? (in
/usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.4800.2)
==20434==    by 0x53AEB43: ??? (in
/usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.4800.2)
==20434==    by 0x538D0AA: ??? (in
/usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.4800.2)
==20434==    by 0x40106B9: call_init.part.0 (dl-init.c:72)
==20434==    by 0x40107CA: call_init (dl-init.c:30)
==20434==    by 0x40107CA: _dl_init (dl-init.c:120)
==20434==    by 0x4000C69: ??? (in /lib/x86_64-linux-gnu/ld-2.23.so)
==20434==
==20434== 96 bytes in 1 blocks are possibly lost in loss record 300 of 349
==20434==    at 0x4C2FB55: calloc (in
/usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==20434==    by 0x50C0770: g_malloc0 (in
/lib/x86_64-linux-gnu/libglib-2.0.so.0.4800.2)
==20434==    by 0x53AEA59: ??? (in
/usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.4800.2)
==20434==    by 0x53AEB43: ??? (in
/usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.4800.2)
==20434==    by 0x53B3F82: g_type_register_fundamental (in
/usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.4800.2)
==20434==    by 0x539330B: ??? (in
/usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.4800.2)
==20434==    by 0x538D177: ??? (in
/usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.4800.2)
==20434==    by 0x40106B9: call_init.part.0 (dl-init.c:72)
==20434==    by 0x40107CA: call_init (dl-init.c:30)
==20434==    by 0x40107CA: _dl_init (dl-init.c:120)
==20434==    by 0x4000C69: ??? (in /lib/x86_64-linux-gnu/ld-2.23.so)
==20434==
==20434== 96 bytes in 1 blocks are possibly lost in loss record 301 of 349
==20434==    at 0x4C2FB55: calloc (in
/usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==20434==    by 0x50C0770: g_malloc0 (in
/lib/x86_64-linux-gnu/libglib-2.0.so.0.4800.2)
==20434==    by 0x53AEA59: ??? (in
/usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.4800.2)
==20434==    by 0x53AEB43: ??? (in
/usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.4800.2)
==20434==    by 0x53B3F82: g_type_register_fundamental (in
/usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.4800.2)
==20434==    by 0x5393371: ??? (in
/usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.4800.2)
==20434==    by 0x538D177: ??? (in
/usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.4800.2)
==20434==    by 0x40106B9: call_init.part.0 (dl-init.c:72)
==20434==    by 0x40107CA: call_init (dl-init.c:30)
==20434==    by 0x40107CA: _dl_init (dl-init.c:120)
==20434==    by 0x4000C69: ??? (in /lib/x86_64-linux-gnu/ld-2.23.so)
==20434==
==20434== 96 bytes in 1 blocks are possibly lost in loss record 302 of 349
==20434==    at 0x4C2FB55: calloc (in
/usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==20434==    by 0x50C0770: g_malloc0 (in
/lib/x86_64-linux-gnu/libglib-2.0.so.0.4800.2)
==20434==    by 0x53AEA59: ??? (in
/usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.4800.2)
==20434==    by 0x53AEB43: ??? (in
/usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.4800.2)
==20434==    by 0x53B3F82: g_type_register_fundamental (in
/usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.4800.2)
==20434==    by 0x539CB04: ??? (in
/usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.4800.2)
==20434==    by 0x538D181: ??? (in
/usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.4800.2)
==20434==    by 0x40106B9: call_init.part.0 (dl-init.c:72)
==20434==    by 0x40107CA: call_init (dl-init.c:30)
==20434==    by 0x40107CA: _dl_init (dl-init.c:120)
==20434==    by 0x4000C69: ??? (in /lib/x86_64-linux-gnu/ld-2.23.so)
==20434==
==20434== 96 bytes in 1 blocks are possibly lost in loss record 303 of 349
==20434==    at 0x4C2FB55: calloc (in
/usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==20434==    by 0x50C0770: g_malloc0 (in
/lib/x86_64-linux-gnu/libglib-2.0.so.0.4800.2)
==20434==    by 0x53AEA59: ??? (in
/usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.4800.2)
==20434==    by 0x53AEB43: ??? (in
/usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.4800.2)
==20434==    by 0x53B3F82: g_type_register_fundamental (in
/usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.4800.2)
==20434==    by 0x5397C1B: ??? (in
/usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.4800.2)
==20434==    by 0x538D186: ??? (in
/usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.4800.2)
==20434==    by 0x40106B9: call_init.part.0 (dl-init.c:72)
==20434==    by 0x40107CA: call_init (dl-init.c:30)
==20434==    by 0x40107CA: _dl_init (dl-init.c:120)
==20434==    by 0x4000C69: ??? (in /lib/x86_64-linux-gnu/ld-2.23.so)
==20434==
==20434== 132 bytes in 1 blocks are possibly lost in loss record 316 of 349
==20434==    at 0x4C2FB55: calloc (in
/usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==20434==    by 0x50C0770: g_malloc0 (in
/lib/x86_64-linux-gnu/libglib-2.0.so.0.4800.2)
==20434==    by 0x53AFDFF: ??? (in
/usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.4800.2)
==20434==    by 0x53B3FE0: g_type_register_fundamental (in
/usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.4800.2)
==20434==    by 0x539330B: ??? (in
/usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.4800.2)
==20434==    by 0x538D177: ??? (in
/usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.4800.2)
==20434==    by 0x40106B9: call_init.part.0 (dl-init.c:72)
==20434==    by 0x40107CA: call_init (dl-init.c:30)
==20434==    by 0x40107CA: _dl_init (dl-init.c:120)
==20434==    by 0x4000C69: ??? (in /lib/x86_64-linux-gnu/ld-2.23.so)
==20434==
==20434== 132 bytes in 1 blocks are possibly lost in loss record 317 of 349
==20434==    at 0x4C2FB55: calloc (in
/usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==20434==    by 0x50C0770: g_malloc0 (in
/lib/x86_64-linux-gnu/libglib-2.0.so.0.4800.2)
==20434==    by 0x53AFDFF: ??? (in
/usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.4800.2)
==20434==    by 0x53B3FE0: g_type_register_fundamental (in
/usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.4800.2)
==20434==    by 0x5393371: ??? (in
/usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.4800.2)
==20434==    by 0x538D177: ??? (in
/usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.4800.2)
==20434==    by 0x40106B9: call_init.part.0 (dl-init.c:72)
==20434==    by 0x40107CA: call_init (dl-init.c:30)
==20434==    by 0x40107CA: _dl_init (dl-init.c:120)
==20434==    by 0x4000C69: ??? (in /lib/x86_64-linux-gnu/ld-2.23.so)
==20434==
==20434== 148 bytes in 1 blocks are possibly lost in loss record 319 of 349
==20434==    at 0x4C2FB55: calloc (in
/usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==20434==    by 0x50C0770: g_malloc0 (in
/lib/x86_64-linux-gnu/libglib-2.0.so.0.4800.2)
==20434==    by 0x53AFBD6: ??? (in
/usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.4800.2)
==20434==    by 0x53B3FE0: g_type_register_fundamental (in
/usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.4800.2)
==20434==    by 0x539CB04: ??? (in
/usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.4800.2)
==20434==    by 0x538D181: ??? (in
/usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.4800.2)
==20434==    by 0x40106B9: call_init.part.0 (dl-init.c:72)
==20434==    by 0x40107CA: call_init (dl-init.c:30)
==20434==    by 0x40107CA: _dl_init (dl-init.c:120)
==20434==    by 0x4000C69: ??? (in /lib/x86_64-linux-gnu/ld-2.23.so)
==20434==
==20434== 148 bytes in 1 blocks are possibly lost in loss record 320 of 349
==20434==    at 0x4C2FB55: calloc (in
/usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==20434==    by 0x50C0770: g_malloc0 (in
/lib/x86_64-linux-gnu/libglib-2.0.so.0.4800.2)
==20434==    by 0x53AFBD6: ??? (in
/usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.4800.2)
==20434==    by 0x53B3FE0: g_type_register_fundamental (in
/usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.4800.2)
==20434==    by 0x5397C1B: ??? (in
/usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.4800.2)
==20434==    by 0x538D186: ??? (in
/usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.4800.2)
==20434==    by 0x40106B9: call_init.part.0 (dl-init.c:72)
==20434==    by 0x40107CA: call_init (dl-init.c:30)
==20434==    by 0x40107CA: _dl_init (dl-init.c:120)
==20434==    by 0x4000C69: ??? (in /lib/x86_64-linux-gnu/ld-2.23.so)
==20434==
==20434== 184 bytes in 1 blocks are possibly lost in loss record 323 of 349
==20434==    at 0x4C2FD5F: realloc (in
/usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==20434==    by 0x50C07D7: g_realloc (in
/lib/x86_64-linux-gnu/libglib-2.0.so.0.4800.2)
==20434==    by 0x53AE9D8: ??? (in
/usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.4800.2)
==20434==    by 0x53B42CC: g_type_register_static (in
/usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.4800.2)
==20434==    by 0x539E799: g_param_type_register_static (in
/usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.4800.2)
==20434==    by 0x53A0AFB: ??? (in
/usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.4800.2)
==20434==    by 0x538D18B: ??? (in
/usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.4800.2)
==20434==    by 0x40106B9: call_init.part.0 (dl-init.c:72)
==20434==    by 0x40107CA: call_init (dl-init.c:30)
==20434==    by 0x40107CA: _dl_init (dl-init.c:120)
==20434==    by 0x4000C69: ??? (in /lib/x86_64-linux-gnu/ld-2.23.so)
==20434==
==20434== 15,334 (752 direct, 14,582 indirect) bytes in 1 blocks are
definitely lost in loss record 347 of 349
==20434==    at 0x4C2DB8F: malloc (in
/usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==20434==    by 0x6CAD97E: xmlNewParserCtxt (in
/usr/lib/x86_64-linux-gnu/libxml2.so.2.9.3)
==20434==    by 0x6CC2C79: xmlCreatePushParserCtxt (in
/usr/lib/x86_64-linux-gnu/libxml2.so.2.9.3)
==20434==    by 0x4E60AF5: rsvg_handle_write (in
/usr/lib/x86_64-linux-gnu/librsvg-2.so.2.40.13)
==20434==    by 0x400BB7: main (in /home/oren/cheese)
==20434==
==20434== LEAK SUMMARY:
==20434==    definitely lost: 752 bytes in 1 blocks
==20434==    indirectly lost: 14,582 bytes in 16 blocks
==20434==      possibly lost: 1,472 bytes in 22 blocks
==20434==    still reachable: 130,607 bytes in 310 blocks
==20434==                       of which reachable via heuristic:
==20434==                         newarray           : 1,536 bytes in 16
blocks
==20434==         suppressed: 0 bytes in 0 blocks
==20434== Reachable blocks (those to which a pointer was found) are not
shown.
==20434== To see them, rerun with: --leak-check=full --show-leak-kinds=all
==20434==
==20434== For counts of detected and suppressed errors, rerun with: -v
==20434== ERROR SUMMARY: 23 errors from 23 contexts (suppressed: 0 from 0)
--- cheese.out ---

Thanks,

Oren Ben-Kiki
_______________________________________________
gtk-app-devel-list mailing list
[hidden email]
https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
Reply | Threaded
Open this post in threaded view
|

Re: Two issues with librsvg

Oren Ben-Kiki
Oops, the sample program I gave was missing the call to rsvg_handle_close.
However, adding it doesn't change anything. The corrected program is:

--- cheese.cpp ---
#include <iostream>
#include <rsvg.h>

using namespace std;

static const char s_svg[] = R"EOF(
<svg>
<rect id='cheese' x='10' y='20' width='300' height='40'/>
</svg>
)EOF";

int main() {
    cerr << "RSVG VERSION: " << LIBRSVG_VERSION << endl;

    RsvgHandle* rsvg = rsvg_handle_new();
    GError* error = nullptr;
    if (!rsvg_handle_write(rsvg,
                           reinterpret_cast<const guchar*>(s_svg),
                           sizeof(s_svg) - 1,
                           &error)
        || !rsvg_handle_close(rsvg, &error)) { // <-- fixed
        cerr << "Oops: " << error->message << endl;
        g_error_free(error);
    } else if (rsvg_handle_has_sub(rsvg, "cheese")) {
        cerr << "Yummy cheese!" << endl;
    } else {
        cerr << "WHERE IS MY CHEESE?" << endl;
    }
    g_object_unref(rsvg);
    return 0;
}
--- cheese.cpp ---

It generates the same output (rsvg_handle_has_sub returns false, and the
valgrind memory leak reports).

Thanks,

Oren Ben-Kiki

On Sat, Oct 21, 2017 at 11:06 PM, Oren Ben-Kiki <[hidden email]>
wrote:

> My main issue is that librsvg seems to not find sub elements by id.
> Specifically, rsvg_handle_has_sub returns false, and therefore querying
> for the element's size and position fails. I'm probably doing something
> wrong here... or is this a bug? I really want the ability to access
> sub-elements size and position (by id or name or something along these
> lines), so any advice/workaround to make this work would be appreciated.
>
> The secondary issue is that librsvg causes memory leaks, or at least
> causes valgrind to think there is such a leak. I can easily work around
> this with a suppression file, but... Is there some additional cleanup
> function I should call to release all allocated memory?
>
> As you can see in the output (below), I am using version 2.40.13, if that
> matters.
>
> Here is the tiny test program:
>
> --- cheese.cpp ---
> #include <iostream>
> #include <rsvg.h>
>
> using namespace std;
>
> static const char s_svg[] = R"EOF(
> <svg>
> <rect id='cheese' x='10' y='20' width='300' height='40'/>
> </svg>
> )EOF";
>
> int main() {
>     cerr << "RSVG VERSION: " << LIBRSVG_VERSION << endl;
>
>     RsvgHandle* rsvg = rsvg_handle_new();
>     GError* error = nullptr;
>     if (!rsvg_handle_write(rsvg,
>                            reinterpret_cast<const guchar*>(s_svg),
>                            sizeof(s_svg) - 1,
>                            &error)) {
>         cerr << "Oops: " << error->message << endl;
>         g_error_free(error);
>     } else if (rsvg_handle_has_sub(rsvg, "cheese")) {
>         cerr << "YUMMY CHEESE!" << endl;
>     } else {
>         cerr << "WHERE IS MY CHEESE?" << endl;
>     }
>     g_object_unref(rsvg);
>     return 0;
> }
> --- cheese.cpp ---
>
> And a tinier shell script running it:
>
> --- cheese.sh ---
> #!/bin/sh
> set -x
> g++ \
>     -std=c++14 \
>     -isystem /usr/include/librsvg-2.0/librsvg \
>     -isystem /usr/include/glib-2.0 \
>     -isystem /usr/lib/x86_64-linux-gnu/glib-2.0/include \
>     -isystem /usr/include/gdk-pixbuf-2.0 \
>     -isystem /usr/include/cairo \
>     -o cheese \
>     cheese.cpp \
>     -lrsvg-2 \
>     -lglib-2.0 \
>     -lgobject-2.0
> valgrind --leak-check=full --track-origins=yes ./cheese
> --- cheese.sh ---
>
> The results are longer:
>
> --- cheese.out ---
> + g++ -std=c++14 -isystem /usr/include/librsvg-2.0/librsvg -isystem
> /usr/include/glib-2.0 -isystem /usr/lib/x86_64-linux-gnu/glib-2.0/include
> -isystem /usr/include/gdk-pixbuf-2.0 -isystem /usr/include/cairo -o cheese
> cheese.cpp -lrsvg-2 -lglib-2.0 -lgobject-2.0
> + valgrind --leak-check=full --track-origins=yes ./cheese
> ==20434== Memcheck, a memory error detector
> ==20434== Copyright (C) 2002-2015, and GNU GPL'd, by Julian Seward et al.
> ==20434== Using Valgrind-3.11.0 and LibVEX; rerun with -h for copyright
> info
> ==20434== Command: ./cheese
> ==20434==
> RSVG VERSION: 2.40.13
> WHERE IS MY CHEESE?
> ==20434==
> ==20434== HEAP SUMMARY:
> ==20434==     in use at exit: 149,205 bytes in 361 blocks
> ==20434==   total heap usage: 522 allocs, 161 frees, 170,579 bytes
> allocated
> ==20434==
> ==20434== 8 bytes in 1 blocks are possibly lost in loss record 17 of 349
> ==20434==    at 0x4C2DB8F: malloc (in /usr/lib/valgrind/vgpreload_
> memcheck-amd64-linux.so)
> ==20434==    by 0x4C2FDEF: realloc (in /usr/lib/valgrind/vgpreload_
> memcheck-amd64-linux.so)
> ==20434==    by 0x50C07D7: g_realloc (in /lib/x86_64-linux-gnu/libglib-
> 2.0.so.0.4800.2)
> ==20434==    by 0x53AE9D8: ??? (in /usr/lib/x86_64-linux-gnu/
> libgobject-2.0.so.0.4800.2)
> ==20434==    by 0x53B42CC: g_type_register_static (in
> /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.4800.2)
> ==20434==    by 0x53B4694: g_type_register_static_simple (in
> /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.4800.2)
> ==20434==    by 0x4E653F3: rsvg_handle_get_type (in
> /usr/lib/x86_64-linux-gnu/librsvg-2.so.2.40.13)
> ==20434==    by 0x4E658B5: rsvg_handle_new (in /usr/lib/x86_64-linux-gnu/
> librsvg-2.so.2.40.13)
> ==20434==    by 0x400B8B: main (in /home/oren/cheese)
> ==20434==
> ==20434== 8 bytes in 1 blocks are possibly lost in loss record 18 of 349
> ==20434==    at 0x4C2DB8F: malloc (in /usr/lib/valgrind/vgpreload_
> memcheck-amd64-linux.so)
> ==20434==    by 0x4C2FDEF: realloc (in /usr/lib/valgrind/vgpreload_
> memcheck-amd64-linux.so)
> ==20434==    by 0x50C07D7: g_realloc (in /lib/x86_64-linux-gnu/libglib-
> 2.0.so.0.4800.2)
> ==20434==    by 0x53AE9D8: ??? (in /usr/lib/x86_64-linux-gnu/
> libgobject-2.0.so.0.4800.2)
> ==20434==    by 0x53B42CC: g_type_register_static (in
> /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.4800.2)
> ==20434==    by 0x539353D: g_flags_register_static (in
> /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.4800.2)
> ==20434==    by 0x4E616A6: rsvg_handle_flags_get_type (in
> /usr/lib/x86_64-linux-gnu/librsvg-2.so.2.40.13)
> ==20434==    by 0x4E64FD3: ??? (in /usr/lib/x86_64-linux-gnu/
> librsvg-2.so.2.40.13)
> ==20434==    by 0x53B222C: g_type_class_ref (in /usr/lib/x86_64-linux-gnu/
> libgobject-2.0.so.0.4800.2)
> ==20434==    by 0x5398DAC: g_object_newv (in /usr/lib/x86_64-linux-gnu/
> libgobject-2.0.so.0.4800.2)
> ==20434==    by 0x5399533: g_object_new (in /usr/lib/x86_64-linux-gnu/
> libgobject-2.0.so.0.4800.2)
> ==20434==    by 0x4E658C9: rsvg_handle_new (in /usr/lib/x86_64-linux-gnu/
> librsvg-2.so.2.40.13)
> ==20434==
> ==20434== 16 bytes in 1 blocks are possibly lost in loss record 124 of 349
> ==20434==    at 0x4C2FB55: calloc (in /usr/lib/valgrind/vgpreload_
> memcheck-amd64-linux.so)
> ==20434==    by 0x50C0770: g_malloc0 (in /lib/x86_64-linux-gnu/libglib-
> 2.0.so.0.4800.2)
> ==20434==    by 0x53AF522: ??? (in /usr/lib/x86_64-linux-gnu/
> libgobject-2.0.so.0.4800.2)
> ==20434==    by 0x53B3F90: g_type_register_fundamental (in
> /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.4800.2)
> ==20434==    by 0x539330B: ??? (in /usr/lib/x86_64-linux-gnu/
> libgobject-2.0.so.0.4800.2)
> ==20434==    by 0x538D177: ??? (in /usr/lib/x86_64-linux-gnu/
> libgobject-2.0.so.0.4800.2)
> ==20434==    by 0x40106B9: call_init.part.0 (dl-init.c:72)
> ==20434==    by 0x40107CA: call_init (dl-init.c:30)
> ==20434==    by 0x40107CA: _dl_init (dl-init.c:120)
> ==20434==    by 0x4000C69: ??? (in /lib/x86_64-linux-gnu/ld-2.23.so)
> ==20434==
> ==20434== 16 bytes in 1 blocks are possibly lost in loss record 125 of 349
> ==20434==    at 0x4C2DB8F: malloc (in /usr/lib/valgrind/vgpreload_
> memcheck-amd64-linux.so)
> ==20434==    by 0x4C2FDEF: realloc (in /usr/lib/valgrind/vgpreload_
> memcheck-amd64-linux.so)
> ==20434==    by 0x50C07D7: g_realloc (in /lib/x86_64-linux-gnu/libglib-
> 2.0.so.0.4800.2)
> ==20434==    by 0x53AF406: ??? (in /usr/lib/x86_64-linux-gnu/
> libgobject-2.0.so.0.4800.2)
> ==20434==    by 0x53B3F90: g_type_register_fundamental (in
> /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.4800.2)
> ==20434==    by 0x539330B: ??? (in /usr/lib/x86_64-linux-gnu/
> libgobject-2.0.so.0.4800.2)
> ==20434==    by 0x538D177: ??? (in /usr/lib/x86_64-linux-gnu/
> libgobject-2.0.so.0.4800.2)
> ==20434==    by 0x40106B9: call_init.part.0 (dl-init.c:72)
> ==20434==    by 0x40107CA: call_init (dl-init.c:30)
> ==20434==    by 0x40107CA: _dl_init (dl-init.c:120)
> ==20434==    by 0x4000C69: ??? (in /lib/x86_64-linux-gnu/ld-2.23.so)
> ==20434==
> ==20434== 16 bytes in 1 blocks are possibly lost in loss record 126 of 349
> ==20434==    at 0x4C2FB55: calloc (in /usr/lib/valgrind/vgpreload_
> memcheck-amd64-linux.so)
> ==20434==    by 0x50C0770: g_malloc0 (in /lib/x86_64-linux-gnu/libglib-
> 2.0.so.0.4800.2)
> ==20434==    by 0x53AF522: ??? (in /usr/lib/x86_64-linux-gnu/
> libgobject-2.0.so.0.4800.2)
> ==20434==    by 0x53B3F90: g_type_register_fundamental (in
> /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.4800.2)
> ==20434==    by 0x5393371: ??? (in /usr/lib/x86_64-linux-gnu/
> libgobject-2.0.so.0.4800.2)
> ==20434==    by 0x538D177: ??? (in /usr/lib/x86_64-linux-gnu/
> libgobject-2.0.so.0.4800.2)
> ==20434==    by 0x40106B9: call_init.part.0 (dl-init.c:72)
> ==20434==    by 0x40107CA: call_init (dl-init.c:30)
> ==20434==    by 0x40107CA: _dl_init (dl-init.c:120)
> ==20434==    by 0x4000C69: ??? (in /lib/x86_64-linux-gnu/ld-2.23.so)
> ==20434==
> ==20434== 16 bytes in 1 blocks are possibly lost in loss record 127 of 349
> ==20434==    at 0x4C2DB8F: malloc (in /usr/lib/valgrind/vgpreload_
> memcheck-amd64-linux.so)
> ==20434==    by 0x4C2FDEF: realloc (in /usr/lib/valgrind/vgpreload_
> memcheck-amd64-linux.so)
> ==20434==    by 0x50C07D7: g_realloc (in /lib/x86_64-linux-gnu/libglib-
> 2.0.so.0.4800.2)
> ==20434==    by 0x53AF406: ??? (in /usr/lib/x86_64-linux-gnu/
> libgobject-2.0.so.0.4800.2)
> ==20434==    by 0x53B3F90: g_type_register_fundamental (in
> /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.4800.2)
> ==20434==    by 0x5393371: ??? (in /usr/lib/x86_64-linux-gnu/
> libgobject-2.0.so.0.4800.2)
> ==20434==    by 0x538D177: ??? (in /usr/lib/x86_64-linux-gnu/
> libgobject-2.0.so.0.4800.2)
> ==20434==    by 0x40106B9: call_init.part.0 (dl-init.c:72)
> ==20434==    by 0x40107CA: call_init (dl-init.c:30)
> ==20434==    by 0x40107CA: _dl_init (dl-init.c:120)
> ==20434==    by 0x4000C69: ??? (in /lib/x86_64-linux-gnu/ld-2.23.so)
> ==20434==
> ==20434== 16 bytes in 1 blocks are possibly lost in loss record 128 of 349
> ==20434==    at 0x4C2FB55: calloc (in /usr/lib/valgrind/vgpreload_
> memcheck-amd64-linux.so)
> ==20434==    by 0x50C0770: g_malloc0 (in /lib/x86_64-linux-gnu/libglib-
> 2.0.so.0.4800.2)
> ==20434==    by 0x53AF522: ??? (in /usr/lib/x86_64-linux-gnu/
> libgobject-2.0.so.0.4800.2)
> ==20434==    by 0x53B3F90: g_type_register_fundamental (in
> /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.4800.2)
> ==20434==    by 0x539CB04: ??? (in /usr/lib/x86_64-linux-gnu/
> libgobject-2.0.so.0.4800.2)
> ==20434==    by 0x538D181: ??? (in /usr/lib/x86_64-linux-gnu/
> libgobject-2.0.so.0.4800.2)
> ==20434==    by 0x40106B9: call_init.part.0 (dl-init.c:72)
> ==20434==    by 0x40107CA: call_init (dl-init.c:30)
> ==20434==    by 0x40107CA: _dl_init (dl-init.c:120)
> ==20434==    by 0x4000C69: ??? (in /lib/x86_64-linux-gnu/ld-2.23.so)
> ==20434==
> ==20434== 16 bytes in 1 blocks are possibly lost in loss record 129 of 349
> ==20434==    at 0x4C2DB8F: malloc (in /usr/lib/valgrind/vgpreload_
> memcheck-amd64-linux.so)
> ==20434==    by 0x4C2FDEF: realloc (in /usr/lib/valgrind/vgpreload_
> memcheck-amd64-linux.so)
> ==20434==    by 0x50C07D7: g_realloc (in /lib/x86_64-linux-gnu/libglib-
> 2.0.so.0.4800.2)
> ==20434==    by 0x53AF406: ??? (in /usr/lib/x86_64-linux-gnu/
> libgobject-2.0.so.0.4800.2)
> ==20434==    by 0x53B3F90: g_type_register_fundamental (in
> /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.4800.2)
> ==20434==    by 0x539CB04: ??? (in /usr/lib/x86_64-linux-gnu/
> libgobject-2.0.so.0.4800.2)
> ==20434==    by 0x538D181: ??? (in /usr/lib/x86_64-linux-gnu/
> libgobject-2.0.so.0.4800.2)
> ==20434==    by 0x40106B9: call_init.part.0 (dl-init.c:72)
> ==20434==    by 0x40107CA: call_init (dl-init.c:30)
> ==20434==    by 0x40107CA: _dl_init (dl-init.c:120)
> ==20434==    by 0x4000C69: ??? (in /lib/x86_64-linux-gnu/ld-2.23.so)
> ==20434==
> ==20434== 16 bytes in 1 blocks are possibly lost in loss record 130 of 349
> ==20434==    at 0x4C2FB55: calloc (in /usr/lib/valgrind/vgpreload_
> memcheck-amd64-linux.so)
> ==20434==    by 0x50C0770: g_malloc0 (in /lib/x86_64-linux-gnu/libglib-
> 2.0.so.0.4800.2)
> ==20434==    by 0x53AF522: ??? (in /usr/lib/x86_64-linux-gnu/
> libgobject-2.0.so.0.4800.2)
> ==20434==    by 0x53B3F90: g_type_register_fundamental (in
> /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.4800.2)
> ==20434==    by 0x5397C1B: ??? (in /usr/lib/x86_64-linux-gnu/
> libgobject-2.0.so.0.4800.2)
> ==20434==    by 0x538D186: ??? (in /usr/lib/x86_64-linux-gnu/
> libgobject-2.0.so.0.4800.2)
> ==20434==    by 0x40106B9: call_init.part.0 (dl-init.c:72)
> ==20434==    by 0x40107CA: call_init (dl-init.c:30)
> ==20434==    by 0x40107CA: _dl_init (dl-init.c:120)
> ==20434==    by 0x4000C69: ??? (in /lib/x86_64-linux-gnu/ld-2.23.so)
> ==20434==
> ==20434== 16 bytes in 1 blocks are possibly lost in loss record 131 of 349
> ==20434==    at 0x4C2DB8F: malloc (in /usr/lib/valgrind/vgpreload_
> memcheck-amd64-linux.so)
> ==20434==    by 0x4C2FDEF: realloc (in /usr/lib/valgrind/vgpreload_
> memcheck-amd64-linux.so)
> ==20434==    by 0x50C07D7: g_realloc (in /lib/x86_64-linux-gnu/libglib-
> 2.0.so.0.4800.2)
> ==20434==    by 0x53AF406: ??? (in /usr/lib/x86_64-linux-gnu/
> libgobject-2.0.so.0.4800.2)
> ==20434==    by 0x53B3F90: g_type_register_fundamental (in
> /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.4800.2)
> ==20434==    by 0x5397C1B: ??? (in /usr/lib/x86_64-linux-gnu/
> libgobject-2.0.so.0.4800.2)
> ==20434==    by 0x538D186: ??? (in /usr/lib/x86_64-linux-gnu/
> libgobject-2.0.so.0.4800.2)
> ==20434==    by 0x40106B9: call_init.part.0 (dl-init.c:72)
> ==20434==    by 0x40107CA: call_init (dl-init.c:30)
> ==20434==    by 0x40107CA: _dl_init (dl-init.c:120)
> ==20434==    by 0x4000C69: ??? (in /lib/x86_64-linux-gnu/ld-2.23.so)
> ==20434==
> ==20434== 24 bytes in 1 blocks are possibly lost in loss record 141 of 349
> ==20434==    at 0x4C2FB55: calloc (in /usr/lib/valgrind/vgpreload_
> memcheck-amd64-linux.so)
> ==20434==    by 0x50C0770: g_malloc0 (in /lib/x86_64-linux-gnu/libglib-
> 2.0.so.0.4800.2)
> ==20434==    by 0x53B23B5: g_type_class_ref (in /usr/lib/x86_64-linux-gnu/
> libgobject-2.0.so.0.4800.2)
> ==20434==    by 0x53B1E2C: g_type_class_ref (in /usr/lib/x86_64-linux-gnu/
> libgobject-2.0.so.0.4800.2)
> ==20434==    by 0x53A1147: g_param_spec_flags (in
> /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.4800.2)
> ==20434==    by 0x4E64FEF: ??? (in /usr/lib/x86_64-linux-gnu/
> librsvg-2.so.2.40.13)
> ==20434==    by 0x53B222C: g_type_class_ref (in /usr/lib/x86_64-linux-gnu/
> libgobject-2.0.so.0.4800.2)
> ==20434==    by 0x5398DAC: g_object_newv (in /usr/lib/x86_64-linux-gnu/
> libgobject-2.0.so.0.4800.2)
> ==20434==    by 0x5399533: g_object_new (in /usr/lib/x86_64-linux-gnu/
> libgobject-2.0.so.0.4800.2)
> ==20434==    by 0x4E658C9: rsvg_handle_new (in /usr/lib/x86_64-linux-gnu/
> librsvg-2.so.2.40.13)
> ==20434==    by 0x400B8B: main (in /home/oren/cheese)
> ==20434==
> ==20434== 80 bytes in 1 blocks are possibly lost in loss record 241 of 349
> ==20434==    at 0x4C2FB55: calloc (in /usr/lib/valgrind/vgpreload_
> memcheck-amd64-linux.so)
> ==20434==    by 0x50C0770: g_malloc0 (in /lib/x86_64-linux-gnu/libglib-
> 2.0.so.0.4800.2)
> ==20434==    by 0x53B23B5: g_type_class_ref (in /usr/lib/x86_64-linux-gnu/
> libgobject-2.0.so.0.4800.2)
> ==20434==    by 0x53B1E2C: g_type_class_ref (in /usr/lib/x86_64-linux-gnu/
> libgobject-2.0.so.0.4800.2)
> ==20434==    by 0x53B5247: g_type_create_instance (in
> /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.4800.2)
> ==20434==    by 0x539CF5F: g_param_spec_internal (in
> /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.4800.2)
> ==20434==    by 0x53A11A0: g_param_spec_flags (in
> /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.4800.2)
> ==20434==    by 0x4E64FEF: ??? (in /usr/lib/x86_64-linux-gnu/
> librsvg-2.so.2.40.13)
> ==20434==    by 0x53B222C: g_type_class_ref (in /usr/lib/x86_64-linux-gnu/
> libgobject-2.0.so.0.4800.2)
> ==20434==    by 0x5398DAC: g_object_newv (in /usr/lib/x86_64-linux-gnu/
> libgobject-2.0.so.0.4800.2)
> ==20434==    by 0x5399533: g_object_new (in /usr/lib/x86_64-linux-gnu/
> libgobject-2.0.so.0.4800.2)
> ==20434==    by 0x4E658C9: rsvg_handle_new (in /usr/lib/x86_64-linux-gnu/
> librsvg-2.so.2.40.13)
> ==20434==
> ==20434== 96 bytes in 1 blocks are possibly lost in loss record 299 of 349
> ==20434==    at 0x4C2FB55: calloc (in /usr/lib/valgrind/vgpreload_
> memcheck-amd64-linux.so)
> ==20434==    by 0x50C0770: g_malloc0 (in /lib/x86_64-linux-gnu/libglib-
> 2.0.so.0.4800.2)
> ==20434==    by 0x53AEA59: ??? (in /usr/lib/x86_64-linux-gnu/
> libgobject-2.0.so.0.4800.2)
> ==20434==    by 0x53AEB43: ??? (in /usr/lib/x86_64-linux-gnu/
> libgobject-2.0.so.0.4800.2)
> ==20434==    by 0x538D0AA: ??? (in /usr/lib/x86_64-linux-gnu/
> libgobject-2.0.so.0.4800.2)
> ==20434==    by 0x40106B9: call_init.part.0 (dl-init.c:72)
> ==20434==    by 0x40107CA: call_init (dl-init.c:30)
> ==20434==    by 0x40107CA: _dl_init (dl-init.c:120)
> ==20434==    by 0x4000C69: ??? (in /lib/x86_64-linux-gnu/ld-2.23.so)
> ==20434==
> ==20434== 96 bytes in 1 blocks are possibly lost in loss record 300 of 349
> ==20434==    at 0x4C2FB55: calloc (in /usr/lib/valgrind/vgpreload_
> memcheck-amd64-linux.so)
> ==20434==    by 0x50C0770: g_malloc0 (in /lib/x86_64-linux-gnu/libglib-
> 2.0.so.0.4800.2)
> ==20434==    by 0x53AEA59: ??? (in /usr/lib/x86_64-linux-gnu/
> libgobject-2.0.so.0.4800.2)
> ==20434==    by 0x53AEB43: ??? (in /usr/lib/x86_64-linux-gnu/
> libgobject-2.0.so.0.4800.2)
> ==20434==    by 0x53B3F82: g_type_register_fundamental (in
> /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.4800.2)
> ==20434==    by 0x539330B: ??? (in /usr/lib/x86_64-linux-gnu/
> libgobject-2.0.so.0.4800.2)
> ==20434==    by 0x538D177: ??? (in /usr/lib/x86_64-linux-gnu/
> libgobject-2.0.so.0.4800.2)
> ==20434==    by 0x40106B9: call_init.part.0 (dl-init.c:72)
> ==20434==    by 0x40107CA: call_init (dl-init.c:30)
> ==20434==    by 0x40107CA: _dl_init (dl-init.c:120)
> ==20434==    by 0x4000C69: ??? (in /lib/x86_64-linux-gnu/ld-2.23.so)
> ==20434==
> ==20434== 96 bytes in 1 blocks are possibly lost in loss record 301 of 349
> ==20434==    at 0x4C2FB55: calloc (in /usr/lib/valgrind/vgpreload_
> memcheck-amd64-linux.so)
> ==20434==    by 0x50C0770: g_malloc0 (in /lib/x86_64-linux-gnu/libglib-
> 2.0.so.0.4800.2)
> ==20434==    by 0x53AEA59: ??? (in /usr/lib/x86_64-linux-gnu/
> libgobject-2.0.so.0.4800.2)
> ==20434==    by 0x53AEB43: ??? (in /usr/lib/x86_64-linux-gnu/
> libgobject-2.0.so.0.4800.2)
> ==20434==    by 0x53B3F82: g_type_register_fundamental (in
> /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.4800.2)
> ==20434==    by 0x5393371: ??? (in /usr/lib/x86_64-linux-gnu/
> libgobject-2.0.so.0.4800.2)
> ==20434==    by 0x538D177: ??? (in /usr/lib/x86_64-linux-gnu/
> libgobject-2.0.so.0.4800.2)
> ==20434==    by 0x40106B9: call_init.part.0 (dl-init.c:72)
> ==20434==    by 0x40107CA: call_init (dl-init.c:30)
> ==20434==    by 0x40107CA: _dl_init (dl-init.c:120)
> ==20434==    by 0x4000C69: ??? (in /lib/x86_64-linux-gnu/ld-2.23.so)
> ==20434==
> ==20434== 96 bytes in 1 blocks are possibly lost in loss record 302 of 349
> ==20434==    at 0x4C2FB55: calloc (in /usr/lib/valgrind/vgpreload_
> memcheck-amd64-linux.so)
> ==20434==    by 0x50C0770: g_malloc0 (in /lib/x86_64-linux-gnu/libglib-
> 2.0.so.0.4800.2)
> ==20434==    by 0x53AEA59: ??? (in /usr/lib/x86_64-linux-gnu/
> libgobject-2.0.so.0.4800.2)
> ==20434==    by 0x53AEB43: ??? (in /usr/lib/x86_64-linux-gnu/
> libgobject-2.0.so.0.4800.2)
> ==20434==    by 0x53B3F82: g_type_register_fundamental (in
> /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.4800.2)
> ==20434==    by 0x539CB04: ??? (in /usr/lib/x86_64-linux-gnu/
> libgobject-2.0.so.0.4800.2)
> ==20434==    by 0x538D181: ??? (in /usr/lib/x86_64-linux-gnu/
> libgobject-2.0.so.0.4800.2)
> ==20434==    by 0x40106B9: call_init.part.0 (dl-init.c:72)
> ==20434==    by 0x40107CA: call_init (dl-init.c:30)
> ==20434==    by 0x40107CA: _dl_init (dl-init.c:120)
> ==20434==    by 0x4000C69: ??? (in /lib/x86_64-linux-gnu/ld-2.23.so)
> ==20434==
> ==20434== 96 bytes in 1 blocks are possibly lost in loss record 303 of 349
> ==20434==    at 0x4C2FB55: calloc (in /usr/lib/valgrind/vgpreload_
> memcheck-amd64-linux.so)
> ==20434==    by 0x50C0770: g_malloc0 (in /lib/x86_64-linux-gnu/libglib-
> 2.0.so.0.4800.2)
> ==20434==    by 0x53AEA59: ??? (in /usr/lib/x86_64-linux-gnu/
> libgobject-2.0.so.0.4800.2)
> ==20434==    by 0x53AEB43: ??? (in /usr/lib/x86_64-linux-gnu/
> libgobject-2.0.so.0.4800.2)
> ==20434==    by 0x53B3F82: g_type_register_fundamental (in
> /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.4800.2)
> ==20434==    by 0x5397C1B: ??? (in /usr/lib/x86_64-linux-gnu/
> libgobject-2.0.so.0.4800.2)
> ==20434==    by 0x538D186: ??? (in /usr/lib/x86_64-linux-gnu/
> libgobject-2.0.so.0.4800.2)
> ==20434==    by 0x40106B9: call_init.part.0 (dl-init.c:72)
> ==20434==    by 0x40107CA: call_init (dl-init.c:30)
> ==20434==    by 0x40107CA: _dl_init (dl-init.c:120)
> ==20434==    by 0x4000C69: ??? (in /lib/x86_64-linux-gnu/ld-2.23.so)
> ==20434==
> ==20434== 132 bytes in 1 blocks are possibly lost in loss record 316 of 349
> ==20434==    at 0x4C2FB55: calloc (in /usr/lib/valgrind/vgpreload_
> memcheck-amd64-linux.so)
> ==20434==    by 0x50C0770: g_malloc0 (in /lib/x86_64-linux-gnu/libglib-
> 2.0.so.0.4800.2)
> ==20434==    by 0x53AFDFF: ??? (in /usr/lib/x86_64-linux-gnu/
> libgobject-2.0.so.0.4800.2)
> ==20434==    by 0x53B3FE0: g_type_register_fundamental (in
> /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.4800.2)
> ==20434==    by 0x539330B: ??? (in /usr/lib/x86_64-linux-gnu/
> libgobject-2.0.so.0.4800.2)
> ==20434==    by 0x538D177: ??? (in /usr/lib/x86_64-linux-gnu/
> libgobject-2.0.so.0.4800.2)
> ==20434==    by 0x40106B9: call_init.part.0 (dl-init.c:72)
> ==20434==    by 0x40107CA: call_init (dl-init.c:30)
> ==20434==    by 0x40107CA: _dl_init (dl-init.c:120)
> ==20434==    by 0x4000C69: ??? (in /lib/x86_64-linux-gnu/ld-2.23.so)
> ==20434==
> ==20434== 132 bytes in 1 blocks are possibly lost in loss record 317 of 349
> ==20434==    at 0x4C2FB55: calloc (in /usr/lib/valgrind/vgpreload_
> memcheck-amd64-linux.so)
> ==20434==    by 0x50C0770: g_malloc0 (in /lib/x86_64-linux-gnu/libglib-
> 2.0.so.0.4800.2)
> ==20434==    by 0x53AFDFF: ??? (in /usr/lib/x86_64-linux-gnu/
> libgobject-2.0.so.0.4800.2)
> ==20434==    by 0x53B3FE0: g_type_register_fundamental (in
> /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.4800.2)
> ==20434==    by 0x5393371: ??? (in /usr/lib/x86_64-linux-gnu/
> libgobject-2.0.so.0.4800.2)
> ==20434==    by 0x538D177: ??? (in /usr/lib/x86_64-linux-gnu/
> libgobject-2.0.so.0.4800.2)
> ==20434==    by 0x40106B9: call_init.part.0 (dl-init.c:72)
> ==20434==    by 0x40107CA: call_init (dl-init.c:30)
> ==20434==    by 0x40107CA: _dl_init (dl-init.c:120)
> ==20434==    by 0x4000C69: ??? (in /lib/x86_64-linux-gnu/ld-2.23.so)
> ==20434==
> ==20434== 148 bytes in 1 blocks are possibly lost in loss record 319 of 349
> ==20434==    at 0x4C2FB55: calloc (in /usr/lib/valgrind/vgpreload_
> memcheck-amd64-linux.so)
> ==20434==    by 0x50C0770: g_malloc0 (in /lib/x86_64-linux-gnu/libglib-
> 2.0.so.0.4800.2)
> ==20434==    by 0x53AFBD6: ??? (in /usr/lib/x86_64-linux-gnu/
> libgobject-2.0.so.0.4800.2)
> ==20434==    by 0x53B3FE0: g_type_register_fundamental (in
> /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.4800.2)
> ==20434==    by 0x539CB04: ??? (in /usr/lib/x86_64-linux-gnu/
> libgobject-2.0.so.0.4800.2)
> ==20434==    by 0x538D181: ??? (in /usr/lib/x86_64-linux-gnu/
> libgobject-2.0.so.0.4800.2)
> ==20434==    by 0x40106B9: call_init.part.0 (dl-init.c:72)
> ==20434==    by 0x40107CA: call_init (dl-init.c:30)
> ==20434==    by 0x40107CA: _dl_init (dl-init.c:120)
> ==20434==    by 0x4000C69: ??? (in /lib/x86_64-linux-gnu/ld-2.23.so)
> ==20434==
> ==20434== 148 bytes in 1 blocks are possibly lost in loss record 320 of 349
> ==20434==    at 0x4C2FB55: calloc (in /usr/lib/valgrind/vgpreload_
> memcheck-amd64-linux.so)
> ==20434==    by 0x50C0770: g_malloc0 (in /lib/x86_64-linux-gnu/libglib-
> 2.0.so.0.4800.2)
> ==20434==    by 0x53AFBD6: ??? (in /usr/lib/x86_64-linux-gnu/
> libgobject-2.0.so.0.4800.2)
> ==20434==    by 0x53B3FE0: g_type_register_fundamental (in
> /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.4800.2)
> ==20434==    by 0x5397C1B: ??? (in /usr/lib/x86_64-linux-gnu/
> libgobject-2.0.so.0.4800.2)
> ==20434==    by 0x538D186: ??? (in /usr/lib/x86_64-linux-gnu/
> libgobject-2.0.so.0.4800.2)
> ==20434==    by 0x40106B9: call_init.part.0 (dl-init.c:72)
> ==20434==    by 0x40107CA: call_init (dl-init.c:30)
> ==20434==    by 0x40107CA: _dl_init (dl-init.c:120)
> ==20434==    by 0x4000C69: ??? (in /lib/x86_64-linux-gnu/ld-2.23.so)
> ==20434==
> ==20434== 184 bytes in 1 blocks are possibly lost in loss record 323 of 349
> ==20434==    at 0x4C2FD5F: realloc (in /usr/lib/valgrind/vgpreload_
> memcheck-amd64-linux.so)
> ==20434==    by 0x50C07D7: g_realloc (in /lib/x86_64-linux-gnu/libglib-
> 2.0.so.0.4800.2)
> ==20434==    by 0x53AE9D8: ??? (in /usr/lib/x86_64-linux-gnu/
> libgobject-2.0.so.0.4800.2)
> ==20434==    by 0x53B42CC: g_type_register_static (in
> /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.4800.2)
> ==20434==    by 0x539E799: g_param_type_register_static (in
> /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.4800.2)
> ==20434==    by 0x53A0AFB: ??? (in /usr/lib/x86_64-linux-gnu/
> libgobject-2.0.so.0.4800.2)
> ==20434==    by 0x538D18B: ??? (in /usr/lib/x86_64-linux-gnu/
> libgobject-2.0.so.0.4800.2)
> ==20434==    by 0x40106B9: call_init.part.0 (dl-init.c:72)
> ==20434==    by 0x40107CA: call_init (dl-init.c:30)
> ==20434==    by 0x40107CA: _dl_init (dl-init.c:120)
> ==20434==    by 0x4000C69: ??? (in /lib/x86_64-linux-gnu/ld-2.23.so)
> ==20434==
> ==20434== 15,334 (752 direct, 14,582 indirect) bytes in 1 blocks are
> definitely lost in loss record 347 of 349
> ==20434==    at 0x4C2DB8F: malloc (in /usr/lib/valgrind/vgpreload_
> memcheck-amd64-linux.so)
> ==20434==    by 0x6CAD97E: xmlNewParserCtxt (in /usr/lib/x86_64-linux-gnu/
> libxml2.so.2.9.3)
> ==20434==    by 0x6CC2C79: xmlCreatePushParserCtxt (in
> /usr/lib/x86_64-linux-gnu/libxml2.so.2.9.3)
> ==20434==    by 0x4E60AF5: rsvg_handle_write (in /usr/lib/x86_64-linux-gnu/
> librsvg-2.so.2.40.13)
> ==20434==    by 0x400BB7: main (in /home/oren/cheese)
> ==20434==
> ==20434== LEAK SUMMARY:
> ==20434==    definitely lost: 752 bytes in 1 blocks
> ==20434==    indirectly lost: 14,582 bytes in 16 blocks
> ==20434==      possibly lost: 1,472 bytes in 22 blocks
> ==20434==    still reachable: 130,607 bytes in 310 blocks
> ==20434==                       of which reachable via heuristic:
> ==20434==                         newarray           : 1,536 bytes in 16
> blocks
> ==20434==         suppressed: 0 bytes in 0 blocks
> ==20434== Reachable blocks (those to which a pointer was found) are not
> shown.
> ==20434== To see them, rerun with: --leak-check=full --show-leak-kinds=all
> ==20434==
> ==20434== For counts of detected and suppressed errors, rerun with: -v
> ==20434== ERROR SUMMARY: 23 errors from 23 contexts (suppressed: 0 from 0)
> --- cheese.out ---
>
> Thanks,
>
> Oren Ben-Kiki
>
_______________________________________________
gtk-app-devel-list mailing list
[hidden email]
https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
Reply | Threaded
Open this post in threaded view
|

Re: Two issues with librsvg

Tristan Van Berkom-3
With a very brief look at your valgrind output i can tell you that you need a suppressions file.

You may be leaking, but you are also counting GType registration as "possibly lost", this is constant data for static types which will be allocated once and remain on the heap for program lifetime, these are not leaks.

Other things, you might be leaking, i havent poured through the whole log.

Cheers,
    -Tristan

> On Oct 22, 2017, at 5:15 AM, Oren Ben-Kiki <[hidden email]> wrote:
>
> Oops, the sample program I gave was missing the call to rsvg_handle_close.
> However, adding it doesn't change anything. The corrected program is:
>
> --- cheese.cpp ---
> #include <iostream>
> #include <rsvg.h>
>
> using namespace std;
>
> static const char s_svg[] = R"EOF(
> <svg>
> <rect id='cheese' x='10' y='20' width='300' height='40'/>
> </svg>
> )EOF";
>
> int main() {
>    cerr << "RSVG VERSION: " << LIBRSVG_VERSION << endl;
>
>    RsvgHandle* rsvg = rsvg_handle_new();
>    GError* error = nullptr;
>    if (!rsvg_handle_write(rsvg,
>                           reinterpret_cast<const guchar*>(s_svg),
>                           sizeof(s_svg) - 1,
>                           &error)
>        || !rsvg_handle_close(rsvg, &error)) { // <-- fixed
>        cerr << "Oops: " << error->message << endl;
>        g_error_free(error);
>    } else if (rsvg_handle_has_sub(rsvg, "cheese")) {
>        cerr << "Yummy cheese!" << endl;
>    } else {
>        cerr << "WHERE IS MY CHEESE?" << endl;
>    }
>    g_object_unref(rsvg);
>    return 0;
> }
> --- cheese.cpp ---
>
> It generates the same output (rsvg_handle_has_sub returns false, and the
> valgrind memory leak reports).
>
> Thanks,
>
> Oren Ben-Kiki
>
> On Sat, Oct 21, 2017 at 11:06 PM, Oren Ben-Kiki <[hidden email]>
> wrote:
>
>> My main issue is that librsvg seems to not find sub elements by id.
>> Specifically, rsvg_handle_has_sub returns false, and therefore querying
>> for the element's size and position fails. I'm probably doing something
>> wrong here... or is this a bug? I really want the ability to access
>> sub-elements size and position (by id or name or something along these
>> lines), so any advice/workaround to make this work would be appreciated.
>>
>> The secondary issue is that librsvg causes memory leaks, or at least
>> causes valgrind to think there is such a leak. I can easily work around
>> this with a suppression file, but... Is there some additional cleanup
>> function I should call to release all allocated memory?
>>
>> As you can see in the output (below), I am using version 2.40.13, if that
>> matters.
>>
>> Here is the tiny test program:
>>
>> --- cheese.cpp ---
>> #include <iostream>
>> #include <rsvg.h>
>>
>> using namespace std;
>>
>> static const char s_svg[] = R"EOF(
>> <svg>
>> <rect id='cheese' x='10' y='20' width='300' height='40'/>
>> </svg>
>> )EOF";
>>
>> int main() {
>>    cerr << "RSVG VERSION: " << LIBRSVG_VERSION << endl;
>>
>>    RsvgHandle* rsvg = rsvg_handle_new();
>>    GError* error = nullptr;
>>    if (!rsvg_handle_write(rsvg,
>>                           reinterpret_cast<const guchar*>(s_svg),
>>                           sizeof(s_svg) - 1,
>>                           &error)) {
>>        cerr << "Oops: " << error->message << endl;
>>        g_error_free(error);
>>    } else if (rsvg_handle_has_sub(rsvg, "cheese")) {
>>        cerr << "YUMMY CHEESE!" << endl;
>>    } else {
>>        cerr << "WHERE IS MY CHEESE?" << endl;
>>    }
>>    g_object_unref(rsvg);
>>    return 0;
>> }
>> --- cheese.cpp ---
>>
>> And a tinier shell script running it:
>>
>> --- cheese.sh ---
>> #!/bin/sh
>> set -x
>> g++ \
>>    -std=c++14 \
>>    -isystem /usr/include/librsvg-2.0/librsvg \
>>    -isystem /usr/include/glib-2.0 \
>>    -isystem /usr/lib/x86_64-linux-gnu/glib-2.0/include \
>>    -isystem /usr/include/gdk-pixbuf-2.0 \
>>    -isystem /usr/include/cairo \
>>    -o cheese \
>>    cheese.cpp \
>>    -lrsvg-2 \
>>    -lglib-2.0 \
>>    -lgobject-2.0
>> valgrind --leak-check=full --track-origins=yes ./cheese
>> --- cheese.sh ---
>>
>> The results are longer:
>>
>> --- cheese.out ---
>> + g++ -std=c++14 -isystem /usr/include/librsvg-2.0/librsvg -isystem
>> /usr/include/glib-2.0 -isystem /usr/lib/x86_64-linux-gnu/glib-2.0/include
>> -isystem /usr/include/gdk-pixbuf-2.0 -isystem /usr/include/cairo -o cheese
>> cheese.cpp -lrsvg-2 -lglib-2.0 -lgobject-2.0
>> + valgrind --leak-check=full --track-origins=yes ./cheese
>> ==20434== Memcheck, a memory error detector
>> ==20434== Copyright (C) 2002-2015, and GNU GPL'd, by Julian Seward et al.
>> ==20434== Using Valgrind-3.11.0 and LibVEX; rerun with -h for copyright
>> info
>> ==20434== Command: ./cheese
>> ==20434==
>> RSVG VERSION: 2.40.13
>> WHERE IS MY CHEESE?
>> ==20434==
>> ==20434== HEAP SUMMARY:
>> ==20434==     in use at exit: 149,205 bytes in 361 blocks
>> ==20434==   total heap usage: 522 allocs, 161 frees, 170,579 bytes
>> allocated
>> ==20434==
>> ==20434== 8 bytes in 1 blocks are possibly lost in loss record 17 of 349
>> ==20434==    at 0x4C2DB8F: malloc (in /usr/lib/valgrind/vgpreload_
>> memcheck-amd64-linux.so)
>> ==20434==    by 0x4C2FDEF: realloc (in /usr/lib/valgrind/vgpreload_
>> memcheck-amd64-linux.so)
>> ==20434==    by 0x50C07D7: g_realloc (in /lib/x86_64-linux-gnu/libglib-
>> 2.0.so.0.4800.2)
>> ==20434==    by 0x53AE9D8: ??? (in /usr/lib/x86_64-linux-gnu/
>> libgobject-2.0.so.0.4800.2)
>> ==20434==    by 0x53B42CC: g_type_register_static (in
>> /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.4800.2)
>> ==20434==    by 0x53B4694: g_type_register_static_simple (in
>> /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.4800.2)
>> ==20434==    by 0x4E653F3: rsvg_handle_get_type (in
>> /usr/lib/x86_64-linux-gnu/librsvg-2.so.2.40.13)
>> ==20434==    by 0x4E658B5: rsvg_handle_new (in /usr/lib/x86_64-linux-gnu/
>> librsvg-2.so.2.40.13)
>> ==20434==    by 0x400B8B: main (in /home/oren/cheese)
>> ==20434==
>> ==20434== 8 bytes in 1 blocks are possibly lost in loss record 18 of 349
>> ==20434==    at 0x4C2DB8F: malloc (in /usr/lib/valgrind/vgpreload_
>> memcheck-amd64-linux.so)
>> ==20434==    by 0x4C2FDEF: realloc (in /usr/lib/valgrind/vgpreload_
>> memcheck-amd64-linux.so)
>> ==20434==    by 0x50C07D7: g_realloc (in /lib/x86_64-linux-gnu/libglib-
>> 2.0.so.0.4800.2)
>> ==20434==    by 0x53AE9D8: ??? (in /usr/lib/x86_64-linux-gnu/
>> libgobject-2.0.so.0.4800.2)
>> ==20434==    by 0x53B42CC: g_type_register_static (in
>> /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.4800.2)
>> ==20434==    by 0x539353D: g_flags_register_static (in
>> /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.4800.2)
>> ==20434==    by 0x4E616A6: rsvg_handle_flags_get_type (in
>> /usr/lib/x86_64-linux-gnu/librsvg-2.so.2.40.13)
>> ==20434==    by 0x4E64FD3: ??? (in /usr/lib/x86_64-linux-gnu/
>> librsvg-2.so.2.40.13)
>> ==20434==    by 0x53B222C: g_type_class_ref (in /usr/lib/x86_64-linux-gnu/
>> libgobject-2.0.so.0.4800.2)
>> ==20434==    by 0x5398DAC: g_object_newv (in /usr/lib/x86_64-linux-gnu/
>> libgobject-2.0.so.0.4800.2)
>> ==20434==    by 0x5399533: g_object_new (in /usr/lib/x86_64-linux-gnu/
>> libgobject-2.0.so.0.4800.2)
>> ==20434==    by 0x4E658C9: rsvg_handle_new (in /usr/lib/x86_64-linux-gnu/
>> librsvg-2.so.2.40.13)
>> ==20434==
>> ==20434== 16 bytes in 1 blocks are possibly lost in loss record 124 of 349
>> ==20434==    at 0x4C2FB55: calloc (in /usr/lib/valgrind/vgpreload_
>> memcheck-amd64-linux.so)
>> ==20434==    by 0x50C0770: g_malloc0 (in /lib/x86_64-linux-gnu/libglib-
>> 2.0.so.0.4800.2)
>> ==20434==    by 0x53AF522: ??? (in /usr/lib/x86_64-linux-gnu/
>> libgobject-2.0.so.0.4800.2)
>> ==20434==    by 0x53B3F90: g_type_register_fundamental (in
>> /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.4800.2)
>> ==20434==    by 0x539330B: ??? (in /usr/lib/x86_64-linux-gnu/
>> libgobject-2.0.so.0.4800.2)
>> ==20434==    by 0x538D177: ??? (in /usr/lib/x86_64-linux-gnu/
>> libgobject-2.0.so.0.4800.2)
>> ==20434==    by 0x40106B9: call_init.part.0 (dl-init.c:72)
>> ==20434==    by 0x40107CA: call_init (dl-init.c:30)
>> ==20434==    by 0x40107CA: _dl_init (dl-init.c:120)
>> ==20434==    by 0x4000C69: ??? (in /lib/x86_64-linux-gnu/ld-2.23.so)
>> ==20434==
>> ==20434== 16 bytes in 1 blocks are possibly lost in loss record 125 of 349
>> ==20434==    at 0x4C2DB8F: malloc (in /usr/lib/valgrind/vgpreload_
>> memcheck-amd64-linux.so)
>> ==20434==    by 0x4C2FDEF: realloc (in /usr/lib/valgrind/vgpreload_
>> memcheck-amd64-linux.so)
>> ==20434==    by 0x50C07D7: g_realloc (in /lib/x86_64-linux-gnu/libglib-
>> 2.0.so.0.4800.2)
>> ==20434==    by 0x53AF406: ??? (in /usr/lib/x86_64-linux-gnu/
>> libgobject-2.0.so.0.4800.2)
>> ==20434==    by 0x53B3F90: g_type_register_fundamental (in
>> /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.4800.2)
>> ==20434==    by 0x539330B: ??? (in /usr/lib/x86_64-linux-gnu/
>> libgobject-2.0.so.0.4800.2)
>> ==20434==    by 0x538D177: ??? (in /usr/lib/x86_64-linux-gnu/
>> libgobject-2.0.so.0.4800.2)
>> ==20434==    by 0x40106B9: call_init.part.0 (dl-init.c:72)
>> ==20434==    by 0x40107CA: call_init (dl-init.c:30)
>> ==20434==    by 0x40107CA: _dl_init (dl-init.c:120)
>> ==20434==    by 0x4000C69: ??? (in /lib/x86_64-linux-gnu/ld-2.23.so)
>> ==20434==
>> ==20434== 16 bytes in 1 blocks are possibly lost in loss record 126 of 349
>> ==20434==    at 0x4C2FB55: calloc (in /usr/lib/valgrind/vgpreload_
>> memcheck-amd64-linux.so)
>> ==20434==    by 0x50C0770: g_malloc0 (in /lib/x86_64-linux-gnu/libglib-
>> 2.0.so.0.4800.2)
>> ==20434==    by 0x53AF522: ??? (in /usr/lib/x86_64-linux-gnu/
>> libgobject-2.0.so.0.4800.2)
>> ==20434==    by 0x53B3F90: g_type_register_fundamental (in
>> /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.4800.2)
>> ==20434==    by 0x5393371: ??? (in /usr/lib/x86_64-linux-gnu/
>> libgobject-2.0.so.0.4800.2)
>> ==20434==    by 0x538D177: ??? (in /usr/lib/x86_64-linux-gnu/
>> libgobject-2.0.so.0.4800.2)
>> ==20434==    by 0x40106B9: call_init.part.0 (dl-init.c:72)
>> ==20434==    by 0x40107CA: call_init (dl-init.c:30)
>> ==20434==    by 0x40107CA: _dl_init (dl-init.c:120)
>> ==20434==    by 0x4000C69: ??? (in /lib/x86_64-linux-gnu/ld-2.23.so)
>> ==20434==
>> ==20434== 16 bytes in 1 blocks are possibly lost in loss record 127 of 349
>> ==20434==    at 0x4C2DB8F: malloc (in /usr/lib/valgrind/vgpreload_
>> memcheck-amd64-linux.so)
>> ==20434==    by 0x4C2FDEF: realloc (in /usr/lib/valgrind/vgpreload_
>> memcheck-amd64-linux.so)
>> ==20434==    by 0x50C07D7: g_realloc (in /lib/x86_64-linux-gnu/libglib-
>> 2.0.so.0.4800.2)
>> ==20434==    by 0x53AF406: ??? (in /usr/lib/x86_64-linux-gnu/
>> libgobject-2.0.so.0.4800.2)
>> ==20434==    by 0x53B3F90: g_type_register_fundamental (in
>> /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.4800.2)
>> ==20434==    by 0x5393371: ??? (in /usr/lib/x86_64-linux-gnu/
>> libgobject-2.0.so.0.4800.2)
>> ==20434==    by 0x538D177: ??? (in /usr/lib/x86_64-linux-gnu/
>> libgobject-2.0.so.0.4800.2)
>> ==20434==    by 0x40106B9: call_init.part.0 (dl-init.c:72)
>> ==20434==    by 0x40107CA: call_init (dl-init.c:30)
>> ==20434==    by 0x40107CA: _dl_init (dl-init.c:120)
>> ==20434==    by 0x4000C69: ??? (in /lib/x86_64-linux-gnu/ld-2.23.so)
>> ==20434==
>> ==20434== 16 bytes in 1 blocks are possibly lost in loss record 128 of 349
>> ==20434==    at 0x4C2FB55: calloc (in /usr/lib/valgrind/vgpreload_
>> memcheck-amd64-linux.so)
>> ==20434==    by 0x50C0770: g_malloc0 (in /lib/x86_64-linux-gnu/libglib-
>> 2.0.so.0.4800.2)
>> ==20434==    by 0x53AF522: ??? (in /usr/lib/x86_64-linux-gnu/
>> libgobject-2.0.so.0.4800.2)
>> ==20434==    by 0x53B3F90: g_type_register_fundamental (in
>> /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.4800.2)
>> ==20434==    by 0x539CB04: ??? (in /usr/lib/x86_64-linux-gnu/
>> libgobject-2.0.so.0.4800.2)
>> ==20434==    by 0x538D181: ??? (in /usr/lib/x86_64-linux-gnu/
>> libgobject-2.0.so.0.4800.2)
>> ==20434==    by 0x40106B9: call_init.part.0 (dl-init.c:72)
>> ==20434==    by 0x40107CA: call_init (dl-init.c:30)
>> ==20434==    by 0x40107CA: _dl_init (dl-init.c:120)
>> ==20434==    by 0x4000C69: ??? (in /lib/x86_64-linux-gnu/ld-2.23.so)
>> ==20434==
>> ==20434== 16 bytes in 1 blocks are possibly lost in loss record 129 of 349
>> ==20434==    at 0x4C2DB8F: malloc (in /usr/lib/valgrind/vgpreload_
>> memcheck-amd64-linux.so)
>> ==20434==    by 0x4C2FDEF: realloc (in /usr/lib/valgrind/vgpreload_
>> memcheck-amd64-linux.so)
>> ==20434==    by 0x50C07D7: g_realloc (in /lib/x86_64-linux-gnu/libglib-
>> 2.0.so.0.4800.2)
>> ==20434==    by 0x53AF406: ??? (in /usr/lib/x86_64-linux-gnu/
>> libgobject-2.0.so.0.4800.2)
>> ==20434==    by 0x53B3F90: g_type_register_fundamental (in
>> /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.4800.2)
>> ==20434==    by 0x539CB04: ??? (in /usr/lib/x86_64-linux-gnu/
>> libgobject-2.0.so.0.4800.2)
>> ==20434==    by 0x538D181: ??? (in /usr/lib/x86_64-linux-gnu/
>> libgobject-2.0.so.0.4800.2)
>> ==20434==    by 0x40106B9: call_init.part.0 (dl-init.c:72)
>> ==20434==    by 0x40107CA: call_init (dl-init.c:30)
>> ==20434==    by 0x40107CA: _dl_init (dl-init.c:120)
>> ==20434==    by 0x4000C69: ??? (in /lib/x86_64-linux-gnu/ld-2.23.so)
>> ==20434==
>> ==20434== 16 bytes in 1 blocks are possibly lost in loss record 130 of 349
>> ==20434==    at 0x4C2FB55: calloc (in /usr/lib/valgrind/vgpreload_
>> memcheck-amd64-linux.so)
>> ==20434==    by 0x50C0770: g_malloc0 (in /lib/x86_64-linux-gnu/libglib-
>> 2.0.so.0.4800.2)
>> ==20434==    by 0x53AF522: ??? (in /usr/lib/x86_64-linux-gnu/
>> libgobject-2.0.so.0.4800.2)
>> ==20434==    by 0x53B3F90: g_type_register_fundamental (in
>> /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.4800.2)
>> ==20434==    by 0x5397C1B: ??? (in /usr/lib/x86_64-linux-gnu/
>> libgobject-2.0.so.0.4800.2)
>> ==20434==    by 0x538D186: ??? (in /usr/lib/x86_64-linux-gnu/
>> libgobject-2.0.so.0.4800.2)
>> ==20434==    by 0x40106B9: call_init.part.0 (dl-init.c:72)
>> ==20434==    by 0x40107CA: call_init (dl-init.c:30)
>> ==20434==    by 0x40107CA: _dl_init (dl-init.c:120)
>> ==20434==    by 0x4000C69: ??? (in /lib/x86_64-linux-gnu/ld-2.23.so)
>> ==20434==
>> ==20434== 16 bytes in 1 blocks are possibly lost in loss record 131 of 349
>> ==20434==    at 0x4C2DB8F: malloc (in /usr/lib/valgrind/vgpreload_
>> memcheck-amd64-linux.so)
>> ==20434==    by 0x4C2FDEF: realloc (in /usr/lib/valgrind/vgpreload_
>> memcheck-amd64-linux.so)
>> ==20434==    by 0x50C07D7: g_realloc (in /lib/x86_64-linux-gnu/libglib-
>> 2.0.so.0.4800.2)
>> ==20434==    by 0x53AF406: ??? (in /usr/lib/x86_64-linux-gnu/
>> libgobject-2.0.so.0.4800.2)
>> ==20434==    by 0x53B3F90: g_type_register_fundamental (in
>> /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.4800.2)
>> ==20434==    by 0x5397C1B: ??? (in /usr/lib/x86_64-linux-gnu/
>> libgobject-2.0.so.0.4800.2)
>> ==20434==    by 0x538D186: ??? (in /usr/lib/x86_64-linux-gnu/
>> libgobject-2.0.so.0.4800.2)
>> ==20434==    by 0x40106B9: call_init.part.0 (dl-init.c:72)
>> ==20434==    by 0x40107CA: call_init (dl-init.c:30)
>> ==20434==    by 0x40107CA: _dl_init (dl-init.c:120)
>> ==20434==    by 0x4000C69: ??? (in /lib/x86_64-linux-gnu/ld-2.23.so)
>> ==20434==
>> ==20434== 24 bytes in 1 blocks are possibly lost in loss record 141 of 349
>> ==20434==    at 0x4C2FB55: calloc (in /usr/lib/valgrind/vgpreload_
>> memcheck-amd64-linux.so)
>> ==20434==    by 0x50C0770: g_malloc0 (in /lib/x86_64-linux-gnu/libglib-
>> 2.0.so.0.4800.2)
>> ==20434==    by 0x53B23B5: g_type_class_ref (in /usr/lib/x86_64-linux-gnu/
>> libgobject-2.0.so.0.4800.2)
>> ==20434==    by 0x53B1E2C: g_type_class_ref (in /usr/lib/x86_64-linux-gnu/
>> libgobject-2.0.so.0.4800.2)
>> ==20434==    by 0x53A1147: g_param_spec_flags (in
>> /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.4800.2)
>> ==20434==    by 0x4E64FEF: ??? (in /usr/lib/x86_64-linux-gnu/
>> librsvg-2.so.2.40.13)
>> ==20434==    by 0x53B222C: g_type_class_ref (in /usr/lib/x86_64-linux-gnu/
>> libgobject-2.0.so.0.4800.2)
>> ==20434==    by 0x5398DAC: g_object_newv (in /usr/lib/x86_64-linux-gnu/
>> libgobject-2.0.so.0.4800.2)
>> ==20434==    by 0x5399533: g_object_new (in /usr/lib/x86_64-linux-gnu/
>> libgobject-2.0.so.0.4800.2)
>> ==20434==    by 0x4E658C9: rsvg_handle_new (in /usr/lib/x86_64-linux-gnu/
>> librsvg-2.so.2.40.13)
>> ==20434==    by 0x400B8B: main (in /home/oren/cheese)
>> ==20434==
>> ==20434== 80 bytes in 1 blocks are possibly lost in loss record 241 of 349
>> ==20434==    at 0x4C2FB55: calloc (in /usr/lib/valgrind/vgpreload_
>> memcheck-amd64-linux.so)
>> ==20434==    by 0x50C0770: g_malloc0 (in /lib/x86_64-linux-gnu/libglib-
>> 2.0.so.0.4800.2)
>> ==20434==    by 0x53B23B5: g_type_class_ref (in /usr/lib/x86_64-linux-gnu/
>> libgobject-2.0.so.0.4800.2)
>> ==20434==    by 0x53B1E2C: g_type_class_ref (in /usr/lib/x86_64-linux-gnu/
>> libgobject-2.0.so.0.4800.2)
>> ==20434==    by 0x53B5247: g_type_create_instance (in
>> /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.4800.2)
>> ==20434==    by 0x539CF5F: g_param_spec_internal (in
>> /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.4800.2)
>> ==20434==    by 0x53A11A0: g_param_spec_flags (in
>> /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.4800.2)
>> ==20434==    by 0x4E64FEF: ??? (in /usr/lib/x86_64-linux-gnu/
>> librsvg-2.so.2.40.13)
>> ==20434==    by 0x53B222C: g_type_class_ref (in /usr/lib/x86_64-linux-gnu/
>> libgobject-2.0.so.0.4800.2)
>> ==20434==    by 0x5398DAC: g_object_newv (in /usr/lib/x86_64-linux-gnu/
>> libgobject-2.0.so.0.4800.2)
>> ==20434==    by 0x5399533: g_object_new (in /usr/lib/x86_64-linux-gnu/
>> libgobject-2.0.so.0.4800.2)
>> ==20434==    by 0x4E658C9: rsvg_handle_new (in /usr/lib/x86_64-linux-gnu/
>> librsvg-2.so.2.40.13)
>> ==20434==
>> ==20434== 96 bytes in 1 blocks are possibly lost in loss record 299 of 349
>> ==20434==    at 0x4C2FB55: calloc (in /usr/lib/valgrind/vgpreload_
>> memcheck-amd64-linux.so)
>> ==20434==    by 0x50C0770: g_malloc0 (in /lib/x86_64-linux-gnu/libglib-
>> 2.0.so.0.4800.2)
>> ==20434==    by 0x53AEA59: ??? (in /usr/lib/x86_64-linux-gnu/
>> libgobject-2.0.so.0.4800.2)
>> ==20434==    by 0x53AEB43: ??? (in /usr/lib/x86_64-linux-gnu/
>> libgobject-2.0.so.0.4800.2)
>> ==20434==    by 0x538D0AA: ??? (in /usr/lib/x86_64-linux-gnu/
>> libgobject-2.0.so.0.4800.2)
>> ==20434==    by 0x40106B9: call_init.part.0 (dl-init.c:72)
>> ==20434==    by 0x40107CA: call_init (dl-init.c:30)
>> ==20434==    by 0x40107CA: _dl_init (dl-init.c:120)
>> ==20434==    by 0x4000C69: ??? (in /lib/x86_64-linux-gnu/ld-2.23.so)
>> ==20434==
>> ==20434== 96 bytes in 1 blocks are possibly lost in loss record 300 of 349
>> ==20434==    at 0x4C2FB55: calloc (in /usr/lib/valgrind/vgpreload_
>> memcheck-amd64-linux.so)
>> ==20434==    by 0x50C0770: g_malloc0 (in /lib/x86_64-linux-gnu/libglib-
>> 2.0.so.0.4800.2)
>> ==20434==    by 0x53AEA59: ??? (in /usr/lib/x86_64-linux-gnu/
>> libgobject-2.0.so.0.4800.2)
>> ==20434==    by 0x53AEB43: ??? (in /usr/lib/x86_64-linux-gnu/
>> libgobject-2.0.so.0.4800.2)
>> ==20434==    by 0x53B3F82: g_type_register_fundamental (in
>> /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.4800.2)
>> ==20434==    by 0x539330B: ??? (in /usr/lib/x86_64-linux-gnu/
>> libgobject-2.0.so.0.4800.2)
>> ==20434==    by 0x538D177: ??? (in /usr/lib/x86_64-linux-gnu/
>> libgobject-2.0.so.0.4800.2)
>> ==20434==    by 0x40106B9: call_init.part.0 (dl-init.c:72)
>> ==20434==    by 0x40107CA: call_init (dl-init.c:30)
>> ==20434==    by 0x40107CA: _dl_init (dl-init.c:120)
>> ==20434==    by 0x4000C69: ??? (in /lib/x86_64-linux-gnu/ld-2.23.so)
>> ==20434==
>> ==20434== 96 bytes in 1 blocks are possibly lost in loss record 301 of 349
>> ==20434==    at 0x4C2FB55: calloc (in /usr/lib/valgrind/vgpreload_
>> memcheck-amd64-linux.so)
>> ==20434==    by 0x50C0770: g_malloc0 (in /lib/x86_64-linux-gnu/libglib-
>> 2.0.so.0.4800.2)
>> ==20434==    by 0x53AEA59: ??? (in /usr/lib/x86_64-linux-gnu/
>> libgobject-2.0.so.0.4800.2)
>> ==20434==    by 0x53AEB43: ??? (in /usr/lib/x86_64-linux-gnu/
>> libgobject-2.0.so.0.4800.2)
>> ==20434==    by 0x53B3F82: g_type_register_fundamental (in
>> /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.4800.2)
>> ==20434==    by 0x5393371: ??? (in /usr/lib/x86_64-linux-gnu/
>> libgobject-2.0.so.0.4800.2)
>> ==20434==    by 0x538D177: ??? (in /usr/lib/x86_64-linux-gnu/
>> libgobject-2.0.so.0.4800.2)
>> ==20434==    by 0x40106B9: call_init.part.0 (dl-init.c:72)
>> ==20434==    by 0x40107CA: call_init (dl-init.c:30)
>> ==20434==    by 0x40107CA: _dl_init (dl-init.c:120)
>> ==20434==    by 0x4000C69: ??? (in /lib/x86_64-linux-gnu/ld-2.23.so)
>> ==20434==
>> ==20434== 96 bytes in 1 blocks are possibly lost in loss record 302 of 349
>> ==20434==    at 0x4C2FB55: calloc (in /usr/lib/valgrind/vgpreload_
>> memcheck-amd64-linux.so)
>> ==20434==    by 0x50C0770: g_malloc0 (in /lib/x86_64-linux-gnu/libglib-
>> 2.0.so.0.4800.2)
>> ==20434==    by 0x53AEA59: ??? (in /usr/lib/x86_64-linux-gnu/
>> libgobject-2.0.so.0.4800.2)
>> ==20434==    by 0x53AEB43: ??? (in /usr/lib/x86_64-linux-gnu/
>> libgobject-2.0.so.0.4800.2)
>> ==20434==    by 0x53B3F82: g_type_register_fundamental (in
>> /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.4800.2)
>> ==20434==    by 0x539CB04: ??? (in /usr/lib/x86_64-linux-gnu/
>> libgobject-2.0.so.0.4800.2)
>> ==20434==    by 0x538D181: ??? (in /usr/lib/x86_64-linux-gnu/
>> libgobject-2.0.so.0.4800.2)
>> ==20434==    by 0x40106B9: call_init.part.0 (dl-init.c:72)
>> ==20434==    by 0x40107CA: call_init (dl-init.c:30)
>> ==20434==    by 0x40107CA: _dl_init (dl-init.c:120)
>> ==20434==    by 0x4000C69: ??? (in /lib/x86_64-linux-gnu/ld-2.23.so)
>> ==20434==
>> ==20434== 96 bytes in 1 blocks are possibly lost in loss record 303 of 349
>> ==20434==    at 0x4C2FB55: calloc (in /usr/lib/valgrind/vgpreload_
>> memcheck-amd64-linux.so)
>> ==20434==    by 0x50C0770: g_malloc0 (in /lib/x86_64-linux-gnu/libglib-
>> 2.0.so.0.4800.2)
>> ==20434==    by 0x53AEA59: ??? (in /usr/lib/x86_64-linux-gnu/
>> libgobject-2.0.so.0.4800.2)
>> ==20434==    by 0x53AEB43: ??? (in /usr/lib/x86_64-linux-gnu/
>> libgobject-2.0.so.0.4800.2)
>> ==20434==    by 0x53B3F82: g_type_register_fundamental (in
>> /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.4800.2)
>> ==20434==    by 0x5397C1B: ??? (in /usr/lib/x86_64-linux-gnu/
>> libgobject-2.0.so.0.4800.2)
>> ==20434==    by 0x538D186: ??? (in /usr/lib/x86_64-linux-gnu/
>> libgobject-2.0.so.0.4800.2)
>> ==20434==    by 0x40106B9: call_init.part.0 (dl-init.c:72)
>> ==20434==    by 0x40107CA: call_init (dl-init.c:30)
>> ==20434==    by 0x40107CA: _dl_init (dl-init.c:120)
>> ==20434==    by 0x4000C69: ??? (in /lib/x86_64-linux-gnu/ld-2.23.so)
>> ==20434==
>> ==20434== 132 bytes in 1 blocks are possibly lost in loss record 316 of 349
>> ==20434==    at 0x4C2FB55: calloc (in /usr/lib/valgrind/vgpreload_
>> memcheck-amd64-linux.so)
>> ==20434==    by 0x50C0770: g_malloc0 (in /lib/x86_64-linux-gnu/libglib-
>> 2.0.so.0.4800.2)
>> ==20434==    by 0x53AFDFF: ??? (in /usr/lib/x86_64-linux-gnu/
>> libgobject-2.0.so.0.4800.2)
>> ==20434==    by 0x53B3FE0: g_type_register_fundamental (in
>> /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.4800.2)
>> ==20434==    by 0x539330B: ??? (in /usr/lib/x86_64-linux-gnu/
>> libgobject-2.0.so.0.4800.2)
>> ==20434==    by 0x538D177: ??? (in /usr/lib/x86_64-linux-gnu/
>> libgobject-2.0.so.0.4800.2)
>> ==20434==    by 0x40106B9: call_init.part.0 (dl-init.c:72)
>> ==20434==    by 0x40107CA: call_init (dl-init.c:30)
>> ==20434==    by 0x40107CA: _dl_init (dl-init.c:120)
>> ==20434==    by 0x4000C69: ??? (in /lib/x86_64-linux-gnu/ld-2.23.so)
>> ==20434==
>> ==20434== 132 bytes in 1 blocks are possibly lost in loss record 317 of 349
>> ==20434==    at 0x4C2FB55: calloc (in /usr/lib/valgrind/vgpreload_
>> memcheck-amd64-linux.so)
>> ==20434==    by 0x50C0770: g_malloc0 (in /lib/x86_64-linux-gnu/libglib-
>> 2.0.so.0.4800.2)
>> ==20434==    by 0x53AFDFF: ??? (in /usr/lib/x86_64-linux-gnu/
>> libgobject-2.0.so.0.4800.2)
>> ==20434==    by 0x53B3FE0: g_type_register_fundamental (in
>> /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.4800.2)
>> ==20434==    by 0x5393371: ??? (in /usr/lib/x86_64-linux-gnu/
>> libgobject-2.0.so.0.4800.2)
>> ==20434==    by 0x538D177: ??? (in /usr/lib/x86_64-linux-gnu/
>> libgobject-2.0.so.0.4800.2)
>> ==20434==    by 0x40106B9: call_init.part.0 (dl-init.c:72)
>> ==20434==    by 0x40107CA: call_init (dl-init.c:30)
>> ==20434==    by 0x40107CA: _dl_init (dl-init.c:120)
>> ==20434==    by 0x4000C69: ??? (in /lib/x86_64-linux-gnu/ld-2.23.so)
>> ==20434==
>> ==20434== 148 bytes in 1 blocks are possibly lost in loss record 319 of 349
>> ==20434==    at 0x4C2FB55: calloc (in /usr/lib/valgrind/vgpreload_
>> memcheck-amd64-linux.so)
>> ==20434==    by 0x50C0770: g_malloc0 (in /lib/x86_64-linux-gnu/libglib-
>> 2.0.so.0.4800.2)
>> ==20434==    by 0x53AFBD6: ??? (in /usr/lib/x86_64-linux-gnu/
>> libgobject-2.0.so.0.4800.2)
>> ==20434==    by 0x53B3FE0: g_type_register_fundamental (in
>> /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.4800.2)
>> ==20434==    by 0x539CB04: ??? (in /usr/lib/x86_64-linux-gnu/
>> libgobject-2.0.so.0.4800.2)
>> ==20434==    by 0x538D181: ??? (in /usr/lib/x86_64-linux-gnu/
>> libgobject-2.0.so.0.4800.2)
>> ==20434==    by 0x40106B9: call_init.part.0 (dl-init.c:72)
>> ==20434==    by 0x40107CA: call_init (dl-init.c:30)
>> ==20434==    by 0x40107CA: _dl_init (dl-init.c:120)
>> ==20434==    by 0x4000C69: ??? (in /lib/x86_64-linux-gnu/ld-2.23.so)
>> ==20434==
>> ==20434== 148 bytes in 1 blocks are possibly lost in loss record 320 of 349
>> ==20434==    at 0x4C2FB55: calloc (in /usr/lib/valgrind/vgpreload_
>> memcheck-amd64-linux.so)
>> ==20434==    by 0x50C0770: g_malloc0 (in /lib/x86_64-linux-gnu/libglib-
>> 2.0.so.0.4800.2)
>> ==20434==    by 0x53AFBD6: ??? (in /usr/lib/x86_64-linux-gnu/
>> libgobject-2.0.so.0.4800.2)
>> ==20434==    by 0x53B3FE0: g_type_register_fundamental (in
>> /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.4800.2)
>> ==20434==    by 0x5397C1B: ??? (in /usr/lib/x86_64-linux-gnu/
>> libgobject-2.0.so.0.4800.2)
>> ==20434==    by 0x538D186: ??? (in /usr/lib/x86_64-linux-gnu/
>> libgobject-2.0.so.0.4800.2)
>> ==20434==    by 0x40106B9: call_init.part.0 (dl-init.c:72)
>> ==20434==    by 0x40107CA: call_init (dl-init.c:30)
>> ==20434==    by 0x40107CA: _dl_init (dl-init.c:120)
>> ==20434==    by 0x4000C69: ??? (in /lib/x86_64-linux-gnu/ld-2.23.so)
>> ==20434==
>> ==20434== 184 bytes in 1 blocks are possibly lost in loss record 323 of 349
>> ==20434==    at 0x4C2FD5F: realloc (in /usr/lib/valgrind/vgpreload_
>> memcheck-amd64-linux.so)
>> ==20434==    by 0x50C07D7: g_realloc (in /lib/x86_64-linux-gnu/libglib-
>> 2.0.so.0.4800.2)
>> ==20434==    by 0x53AE9D8: ??? (in /usr/lib/x86_64-linux-gnu/
>> libgobject-2.0.so.0.4800.2)
>> ==20434==    by 0x53B42CC: g_type_register_static (in
>> /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.4800.2)
>> ==20434==    by 0x539E799: g_param_type_register_static (in
>> /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.4800.2)
>> ==20434==    by 0x53A0AFB: ??? (in /usr/lib/x86_64-linux-gnu/
>> libgobject-2.0.so.0.4800.2)
>> ==20434==    by 0x538D18B: ??? (in /usr/lib/x86_64-linux-gnu/
>> libgobject-2.0.so.0.4800.2)
>> ==20434==    by 0x40106B9: call_init.part.0 (dl-init.c:72)
>> ==20434==    by 0x40107CA: call_init (dl-init.c:30)
>> ==20434==    by 0x40107CA: _dl_init (dl-init.c:120)
>> ==20434==    by 0x4000C69: ??? (in /lib/x86_64-linux-gnu/ld-2.23.so)
>> ==20434==
>> ==20434== 15,334 (752 direct, 14,582 indirect) bytes in 1 blocks are
>> definitely lost in loss record 347 of 349
>> ==20434==    at 0x4C2DB8F: malloc (in /usr/lib/valgrind/vgpreload_
>> memcheck-amd64-linux.so)
>> ==20434==    by 0x6CAD97E: xmlNewParserCtxt (in /usr/lib/x86_64-linux-gnu/
>> libxml2.so.2.9.3)
>> ==20434==    by 0x6CC2C79: xmlCreatePushParserCtxt (in
>> /usr/lib/x86_64-linux-gnu/libxml2.so.2.9.3)
>> ==20434==    by 0x4E60AF5: rsvg_handle_write (in /usr/lib/x86_64-linux-gnu/
>> librsvg-2.so.2.40.13)
>> ==20434==    by 0x400BB7: main (in /home/oren/cheese)
>> ==20434==
>> ==20434== LEAK SUMMARY:
>> ==20434==    definitely lost: 752 bytes in 1 blocks
>> ==20434==    indirectly lost: 14,582 bytes in 16 blocks
>> ==20434==      possibly lost: 1,472 bytes in 22 blocks
>> ==20434==    still reachable: 130,607 bytes in 310 blocks
>> ==20434==                       of which reachable via heuristic:
>> ==20434==                         newarray           : 1,536 bytes in 16
>> blocks
>> ==20434==         suppressed: 0 bytes in 0 blocks
>> ==20434== Reachable blocks (those to which a pointer was found) are not
>> shown.
>> ==20434== To see them, rerun with: --leak-check=full --show-leak-kinds=all
>> ==20434==
>> ==20434== For counts of detected and suppressed errors, rerun with: -v
>> ==20434== ERROR SUMMARY: 23 errors from 23 contexts (suppressed: 0 from 0)
>> --- cheese.out ---
>>
>> Thanks,
>>
>> Oren Ben-Kiki
> _______________________________________________
> gtk-app-devel-list mailing list
> [hidden email]
> https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
>

_______________________________________________
gtk-app-devel-list mailing list
[hidden email]
https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list