[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Texmacs-dev] Using Valgrind and first results
From: |
David MENTRE |
Subject: |
Re: [Texmacs-dev] Using Valgrind and first results |
Date: |
Tue, 25 May 2004 13:25:02 +0200 |
User-agent: |
Gnus/5.1006 (Gnus v5.10.6) Emacs/21.3 (gnu/linux) |
Joris van der Hoeven <address@hidden> writes:
> Would it be possible to get a backtrace which goes slightly further
> than four items?
Yep: use --num-callers= option (--num-callers=10 sees to be correct).
> Also: is it possible to teach valgrind how to
> display the lost blocks?
I don't think so.
However, it is possible to print also information about still reachable
but not freed blocks using option --show-reachable=yes.
Here is a trace with those options:
exec valgrind --leak-check=yes --num-callers=10 --suppressions=texmacs.supp
--show-reachable=yes -v texmacs.bin "$@"
==7818== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 118187 from 12)
--7818--
--7818-- supp: 45 Ugly strchr error in /lib/ld-2.3.2.so
--7818-- supp: 11 Unitialized value in edit_env_rep::decode_length(string)
(env_exec.cpp:1656)
--7818-- supp: 4 TLS Syscall param writev(vector[...]) contains
uninitialised or unaddressable byte(s)
--7818-- supp: 4 Guile GC uninitialised value of size 4 in scm_markstream
--7818-- supp: 16 Guile GC scm_c_hook_run
--7818-- supp: 913 Guile GC scm_c_hook_run
--7818-- supp: 11358 Guile GC scm_igc
--7818-- supp: 1 Guile GC marking
--7818-- supp: 18888 Guile GC marking
--7818-- supp: 18239 Guile GC marking
--7818-- supp: 68205 Guile GC marking
--7818-- supp: 503 __libc_sigaction (in /lib/tls/libc-2.3.2.so
==7818== malloc/free: in use at exit: 7615036 bytes in 14895 blocks.
==7818== malloc/free: 38821 allocs, 23926 frees, 10960387 bytes allocated.
==7818==
==7818== searching for pointers to 14895 not-freed blocks.
==7818== checked 15380208 bytes.
==7818==
==7818== 50 bytes in 2 blocks are still reachable in loss record 41 of 105
==7818== at 0x3C01F40D: malloc (vg_replace_malloc.c:105)
==7818== by 0x3C0067BE: _dl_map_object (in /lib/ld-2.3.2.so)
==7818== by 0x3C00AA18: (within /lib/ld-2.3.2.so)
==7818== by 0x3C00BF25: _dl_catch_error (in /lib/ld-2.3.2.so)
==7818== by 0x3C00B490: _dl_map_object_deps (in /lib/ld-2.3.2.so)
==7818== by 0x3C489FE5: (within /lib/tls/libc-2.3.2.so)
==7818== by 0x3C00BF25: _dl_catch_error (in /lib/ld-2.3.2.so)
==7818== by 0x3C489D79: _dl_open (in /lib/tls/libc-2.3.2.so)
==7818== by 0x3C2B3FD6: (within /lib/tls/libdl-2.3.2.so)
==7818== by 0x3C2B4455: (within /lib/tls/libdl-2.3.2.so)
==7818==
==7818==
==7818== 5520 bytes in 3 blocks are definitely lost in loss record 94 of 105
==7818== at 0x3C01F40D: malloc (vg_replace_malloc.c:105)
==7818== by 0x817EED0: safe_malloc(unsigned) (fast_alloc.cpp:35)
==7818== by 0x80570E7: operator new[](unsigned) (basic.cpp:62)
==7818== by 0x8273F2D: as_charp(string) (string.cpp:235)
==7818== by 0x8276286: set_env(string, string) (sys_utils.cpp:80)
==7818== by 0x81DD3E4: set_env_path(string, url) (init_texmacs.cpp:42)
==7818== by 0x81DD509: get_env_path(string, url) (init_texmacs.cpp:49)
==7818== by 0x81DE764: init_env_vars() (init_texmacs.cpp:220)
==7818== by 0x81DFEC6: init_texmacs() (init_texmacs.cpp:388)
==7818== by 0x830FF55: main (texmacs.cpp:208)
==7818==
==7818==
==7818== 2031616 bytes in 31 blocks are still reachable in loss record 103 of
105
==7818== at 0x3C01F40D: malloc (vg_replace_malloc.c:105)
==7818== by 0x817EED0: safe_malloc(unsigned) (fast_alloc.cpp:35)
==7818== by 0x817EF1C: enlarge_malloc(unsigned) (fast_alloc.cpp:46)
==7818== by 0x8057004: operator new(unsigned) (basic.cpp:25)
==7818== by 0x8051C6E: tree::tree(char*) (tree.hpp:141)
==7818== by 0x809B0D0: url_none() (url.hpp:60)
==7818== by 0x830CF36: __static_initialization_and_destruction_0(int, int)
(tm_server.cpp:22)
==7818== by 0x830D0A5: _GLOBAL(i_xx_t, short,...)(long double,
void,...)(long double) (tm_server.cpp:49)
==7818== by 0x8310104: (within
/home/david/00-poubelle/texmacs/libexec/TeXmacs/bin/texmacs.bin)
==7818== by 0x804AA78: (within
/home/david/00-poubelle/texmacs/libexec/TeXmacs/bin/texmacs.bin)
==7818==
==7818==
==7818== 2048660 bytes in 202 blocks are possibly lost in loss record 104 of 105
==7818== at 0x3C01F40D: malloc (vg_replace_malloc.c:105)
==7818== by 0x817EED0: safe_malloc(unsigned) (fast_alloc.cpp:35)
==7818== by 0x80570E7: operator new[](unsigned) (basic.cpp:62)
==7818== by 0x80CE2B0: hashmap_rep<tree_label, tag_info>::resize(int)
(hashmap.cpp:54)
==7818== by 0x80CE193: hashmap_rep<tree_label,
tag_info>::bracket_rw(tree_label) (hashmap.cpp:89)
==7818== by 0x80CDE4D: hashmap<tree_label, tag_info>::operator()(tree_label)
(hashmap.hpp:83)
==7818== by 0x80CD7B1: rel_hashmap<tree_label,
tag_info>::operator()(tree_label) (rel_hashmap.cpp:35)
==7818== by 0x80CF2AD: init(tree_label, string, tag_info) (drd_std.cpp:45)
==7818== by 0x80D414E: init_std_drd() (drd_std.cpp:215)
==7818== by 0x81DFEB2: init_texmacs() (init_texmacs.cpp:384)
==7818==
==7818== LEAK SUMMARY:
==7818== definitely lost: 5520 bytes in 3 blocks.
==7818== possibly lost: 2048660 bytes in 202 blocks.
==7818== still reachable: 2031666 bytes in 33 blocks.
==7818== suppressed: 3529190 bytes in 14657 blocks.
Yours,
d.
--
David Mentré <address@hidden>