On Fri, 2012-08-10 at 15:25 -0700, David Lutterkort wrote:
> When I run valgrind on the two pass_square_* tests, there's a few
> allocation problems (valgrind output is attached)

Well, now it is.

David

==7382== Memcheck, a memory error detector
==7382== Copyright (C) 2002-2010, and GNU GPL'd, by Julian Seward et al.
==7382== Using Valgrind-3.6.1 and LibVEX; rerun with -h for copyright info
==7382== Command: /homes/lutter/code/augeas/src/.libs/lt-augparse --notypecheck --nostdinc -I /homes/lutter/code/augeas/lenses tests/modules/pass_square.aug
==7382== 
==7382== Invalid read of size 8
==7382==    at 0x3B69C98254: __stpncpy_sse2_unaligned (strcpy-sse2-unaligned.S:297)
==7382==    by 0x4C37795: enc_format (lens.c:1051)
==7382==    by 0x4C47CDA: regexp_match_error (put.c:120)
==7382==    by 0x4C481F1: split_concat (put.c:229)
==7382==    by 0x4C49B6C: create_concat (put.c:712)
==7382==    by 0x4C4A0A3: create_lens (put.c:812)
==7382==    by 0x4C48D26: put_subtree (put.c:454)
==7382==    by 0x4C499C1: create_subtree (put.c:683)
==7382==    by 0x4C4A0D3: create_lens (put.c:818)
==7382==    by 0x4C49EC4: create_quant_star (put.c:766)
==7382==    by 0x4C4A0E8: create_lens (put.c:821)
==7382==    by 0x4C49DBB: create_square (put.c:748)
==7382==  Address 0x51fafe0 is 0 bytes inside a block of size 4 alloc'd
==7382==    at 0x4A05BB4: calloc (vg_replace_malloc.c:467)
==7382==    by 0x4C233EE: mem_alloc_n (memory.c:66)
==7382==    by 0x4C47E65: make_split (put.c:159)
==7382==    by 0x4C48C89: put_subtree (put.c:449)
==7382==    by 0x4C499C1: create_subtree (put.c:683)
==7382==    by 0x4C4A0D3: create_lens (put.c:818)
==7382==    by 0x4C49EC4: create_quant_star (put.c:766)
==7382==    by 0x4C4A0E8: create_lens (put.c:821)
==7382==    by 0x4C49DBB: create_square (put.c:748)
==7382==    by 0x4C4A127: create_lens (put.c:830)
==7382==    by 0x4C49C0F: create_concat (put.c:722)
==7382==    by 0x4C4A0A3: create_lens (put.c:812)
==7382== 
==7382== Invalid read of size 8
==7382==    at 0x3B69C98258: __stpncpy_sse2_unaligned (strcpy-sse2-unaligned.S:298)
==7382==    by 0x4C37795: enc_format (lens.c:1051)
==7382==    by 0x4C47CDA: regexp_match_error (put.c:120)
==7382==    by 0x4C481F1: split_concat (put.c:229)
==7382==    by 0x4C49B6C: create_concat (put.c:712)
==7382==    by 0x4C4A0A3: create_lens (put.c:812)
==7382==    by 0x4C48D26: put_subtree (put.c:454)
==7382==    by 0x4C499C1: create_subtree (put.c:683)
==7382==    by 0x4C4A0D3: create_lens (put.c:818)
==7382==    by 0x4C49EC4: create_quant_star (put.c:766)
==7382==    by 0x4C4A0E8: create_lens (put.c:821)
==7382==    by 0x4C49DBB: create_square (put.c:748)
==7382==  Address 0x51faff0 is 12 bytes after a block of size 4 alloc'd
==7382==    at 0x4A05BB4: calloc (vg_replace_malloc.c:467)
==7382==    by 0x4C233EE: mem_alloc_n (memory.c:66)
==7382==    by 0x4C47E65: make_split (put.c:159)
==7382==    by 0x4C48C89: put_subtree (put.c:449)
==7382==    by 0x4C499C1: create_subtree (put.c:683)
==7382==    by 0x4C4A0D3: create_lens (put.c:818)
==7382==    by 0x4C49EC4: create_quant_star (put.c:766)
==7382==    by 0x4C4A0E8: create_lens (put.c:821)
==7382==    by 0x4C49DBB: create_square (put.c:748)
==7382==    by 0x4C4A127: create_lens (put.c:830)
==7382==    by 0x4C49C0F: create_concat (put.c:722)
==7382==    by 0x4C4A0A3: create_lens (put.c:812)
==7382== 
==7382== 
==7382== HEAP SUMMARY:
==7382==     in use at exit: 0 bytes in 0 blocks
==7382==   total heap usage: 11,557 allocs, 11,557 frees, 909,255 bytes allocated
==7382== 
==7382== All heap blocks were freed -- no leaks are possible
==7382== 
==7382== For counts of detected and suppressed errors, rerun with: -v
==7382== ERROR SUMMARY: 4 errors from 2 contexts (suppressed: 2 from 2)
==6996== Memcheck, a memory error detector
==6996== Copyright (C) 2002-2010, and GNU GPL'd, by Julian Seward et al.
==6996== Using Valgrind-3.6.1 and LibVEX; rerun with -h for copyright info
==6996== Command: /homes/lutter/code/augeas/src/.libs/lt-augparse --notypecheck --nostdinc -I /homes/lutter/code/augeas/lenses tests/modules/pass_square_rec.aug
==6996== 
==6996== 
==6996== HEAP SUMMARY:
==6996==     in use at exit: 1,728 bytes in 48 blocks
==6996==   total heap usage: 17,376 allocs, 17,328 frees, 1,178,448 bytes allocated
==6996== 
==6996== 1,728 (120 direct, 1,608 indirect) bytes in 3 blocks are definitely lost in loss record 14 of 14
==6996==    at 0x4A05BB4: calloc (vg_replace_malloc.c:467)
==6996==    by 0x4C42842: make_ast (get.c:128)
==6996==    by 0x4C45D64: visit_enter (get.c:1052)
==6996==    by 0x4C4D088: visit_enter (jmt.c:911)
==6996==    by 0x4C4D715: jmt_visit (jmt.c:1037)
==6996==    by 0x4C46CB7: rec_process (get.c:1292)
==6996==    by 0x4C46EDE: get_rec (get.c:1338)
==6996==    by 0x4C47408: lns_get (get.c:1467)
==6996==    by 0x4C31371: lens_get (builtin.c:183)
==6996==    by 0x4C27E31: native_call (syntax.c:1043)
==6996==    by 0x4C2B65B: compile_exp (syntax.c:1675)
==6996==    by 0x4C2AD63: apply (syntax.c:1588)
==6996== 
==6996== LEAK SUMMARY:
==6996==    definitely lost: 120 bytes in 3 blocks
==6996==    indirectly lost: 1,608 bytes in 45 blocks
==6996==      possibly lost: 0 bytes in 0 blocks
==6996==    still reachable: 0 bytes in 0 blocks
==6996==         suppressed: 0 bytes in 0 blocks
==6996== 
==6996== For counts of detected and suppressed errors, rerun with: -v
==6996== ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 2 from 2)
_______________________________________________
augeas-devel mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/augeas-devel

Reply via email to