Package: libgc1c2
Version: 1:7.2d-6.4
Severity: important

Dear Christoph Egger
<https://bugs.debian.org/cgi-bin/pkgreport.cgi?maint=christoph%40debian.org>
,

I've tried to test performance of libgc with simple code.

I've made a simple program that creates a single linked list, but
remembers only last item.

It leaks memory when linked with bundled libgc, and do not leaks when
linked with libgc compilled from source.

Note: while i'm using Ubuntu, i've already asked my friend to test it
on Debian stable, and he confirms bug exists. That is why I post bug
report to Debian.

Source code:

    #include <gc.h>

    struct list {
        struct list* next;
    };

    int main() {
        GC_INIT();
        struct list *last = NULL;
        for (;;) {
            struct list* nuo = GC_MALLOC(sizeof(struct list));
            nuo->next = NULL;
            // if next line is commented, then no leakage
            if (last) last->next = nuo;
            last = nuo;
        }
    }


-- System Information:
Debian Release: jessie/sid
  APT prefers vivid-updates
  APT policy: (500, 'vivid-updates'), (500, 'vivid-security'), (500,
'vivid-proposed'), (500, 'vivid'), (100, 'vivid-backports')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 3.19.0-23-generic (SMP w/8 CPU cores)
Locale: LANG=ru_RU.UTF-8, LC_CTYPE=ru_RU.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages libgc1c2 depends on:
ii  libc6              2.21-0ubuntu4
ii  multiarch-support  2.21-0ubuntu4

libgc1c2 recommends no packages.

libgc1c2 suggests no packages.

-- no debconf information

Reply via email to