Skip to content

realloc-16687 test leaks memory #17303

Closed
@alexcrichton

Description

@alexcrichton
$ rustc src/test/run-pass/realloc-16687.rs && valgrind --leak-check=full ./realloc-16687 
==4914== Memcheck, a memory error detector
==4914== Copyright (C) 2002-2013, and GNU GPL'd, by Julian Seward et al.
==4914== Using Valgrind-3.10.0.SVN and LibVEX; rerun with -h for copyright info
==4914== Command: ./realloc-16687
==4914== 
==4914== 
==4914== HEAP SUMMARY:
==4914==     in use at exit: 832 bytes in 16 blocks
==4914==   total heap usage: 92 allocs, 76 frees, 8,384 bytes allocated
==4914== 
==4914== 416 bytes in 8 blocks are definitely lost in loss record 1 of 2
==4914==    at 0x167BEC: je_rallocx (in /home/alex/code/rust2/realloc-16687)
==4914==    by 0x1157B6: heap::imp::reallocate::h79d83959002ee6a8rha (in /home/alex/code/rust2/realloc-16687)
==4914==    by 0x1156F5: heap::reallocate::hab85b6905c8086a1yaa (in /home/alex/code/rust2/realloc-16687)
==4914==    by 0x1153E0: test_triangle::reallocate::hce22b2100fcc031d6ia (in /home/alex/code/rust2/realloc-16687)
==4914==    by 0x114D99: test_triangle::test_4::h7f38076d2656a38dQva (in /home/alex/code/rust2/realloc-16687)
==4914==    by 0x111B68: test_triangle::hae2dbf867a1dc84dMaa (in /home/alex/code/rust2/realloc-16687)
==4914==    by 0x1113BD: main::h796c90ed3713cda0haa (in /home/alex/code/rust2/realloc-16687)
==4914==    by 0x149DEA: start::closure.8494 (in /home/alex/code/rust2/realloc-16687)
==4914==    by 0x161F8B: rust_try_inner (in /home/alex/code/rust2/realloc-16687)
==4914==    by 0x161F75: rust_try (in /home/alex/code/rust2/realloc-16687)
==4914==    by 0x15F582: unwind::try::hc32837413dc79d50uId (in /home/alex/code/rust2/realloc-16687)
==4914==    by 0x15F42B: task::Task::run::he2343ec4d9f3287dfYc (in /home/alex/code/rust2/realloc-16687)
==4914== 
==4914== 416 bytes in 8 blocks are definitely lost in loss record 2 of 2
==4914==    at 0x167BEC: je_rallocx (in /home/alex/code/rust2/realloc-16687)
==4914==    by 0x1157B6: heap::imp::reallocate::h79d83959002ee6a8rha (in /home/alex/code/rust2/realloc-16687)
==4914==    by 0x1156F5: heap::reallocate::hab85b6905c8086a1yaa (in /home/alex/code/rust2/realloc-16687)
==4914==    by 0x1153E0: test_triangle::reallocate::hce22b2100fcc031d6ia (in /home/alex/code/rust2/realloc-16687)
==4914==    by 0x114E78: test_triangle::test_4::h7f38076d2656a38dQva (in /home/alex/code/rust2/realloc-16687)
==4914==    by 0x111B68: test_triangle::hae2dbf867a1dc84dMaa (in /home/alex/code/rust2/realloc-16687)
==4914==    by 0x1113BD: main::h796c90ed3713cda0haa (in /home/alex/code/rust2/realloc-16687)
==4914==    by 0x149DEA: start::closure.8494 (in /home/alex/code/rust2/realloc-16687)
==4914==    by 0x161F8B: rust_try_inner (in /home/alex/code/rust2/realloc-16687)
==4914==    by 0x161F75: rust_try (in /home/alex/code/rust2/realloc-16687)
==4914==    by 0x15F582: unwind::try::hc32837413dc79d50uId (in /home/alex/code/rust2/realloc-16687)
==4914==    by 0x15F42B: task::Task::run::he2343ec4d9f3287dfYc (in /home/alex/code/rust2/realloc-16687)
==4914== 
==4914== LEAK SUMMARY:
==4914==    definitely lost: 832 bytes in 16 blocks
==4914==    indirectly lost: 0 bytes in 0 blocks
==4914==      possibly lost: 0 bytes in 0 blocks
==4914==    still reachable: 0 bytes in 0 blocks
==4914==         suppressed: 0 bytes in 0 blocks
==4914== 
==4914== For counts of detected and suppressed errors, rerun with: -v
==4914== ERROR SUMMARY: 2 errors from 2 contexts (suppressed: 0 from 0)

I'm ignoring this test for now as it looks fairly complicated and this is required for a new snapshot to pass.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions