mirror of
https://github.com/Zenithsiz/ftmemsim-valgrind.git
synced 2026-02-03 18:13:01 +00:00
A '3 lines how to':
perl tests/vg_regtest --outer-valgrind=../trunk_untouched/install/bin/valgrind --all
(the outer results for a test xxx is in xxx.outer.log)
To run with another tool (e.g. drd), add the argument --outer-tool=drd
Still to do/things to improve:
* Most (inner) tests are successful when running under an outer
memcheck. Need to analyse the reasons of remaining failures.
* The memcheck annotations in m_mallocfree.c can be improved:
- A superblock is marked 'undefined', it should rather be marked
'no access'.
- When a free block is splitted, the remaining free block is
not made 'no access'. Instead, it is made 'undefined'.
=> this decreases the chance to find bugs.
=> this is not very efficient (e.g. the rest of a superblock
is often marked undefined repetitively).
Similarly, the free block created by VG_(arena_memalign)
is marked 'undefined'. 'No access' would be preferrable.
- mkInuseBlock marks the new block as undefined. This is probably
not needed, as VALGRIND_MALLOCLIKE_BLOCK will do it already.
- VG_(arena_malloc) should give the requested size to
VALGRIND_MALLOCLIKE_BLOCK, not the malloc usable size,
as this decreases the chance to find buffer overrun bugs.
But giving the requested size is tricky (see comments in
the code).
* need to do memcheck annotations in m_poolalloc.c
so as to allow leak checking for pool allocated elements.
* vg_regtest.in
- should analyse the results of the outer and should
produce a separate result for the tests for which
the outer detects an error or a memory leak or ...
Changes done:
README_DEVELOPERS: document the new outer/inner features.
manual-core.xml: document the new sim-hint no-inner-prefix
tests/outer_inner.supp: new file, containing the suppressions for inner.
vg_regtest.in: implement new args --outer-valgrind, --outer-tool, --outer-args.
m_mallocfree.c: annotations for memcheck.
m_libcprint.c: handle the new sim-hint no-inner-prefix
m_main.c: do an (early) parse of --sim-hints
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12441
47 lines
1.9 KiB
Plaintext
47 lines
1.9 KiB
Plaintext
|
|
# errors to suppress when an outer runs an inner.
|
|
|
|
# ==31040== 16 bytes in 1 blocks are definitely lost in loss record 10 of 106
|
|
# ==31040== at 0x2803A367: vgPlain_arena_malloc (m_mallocfree.c:1599)
|
|
# ==31040== by 0x2803ADE3: vgPlain_strdup (m_mallocfree.c:2140)
|
|
# ==31040== by 0x2803208A: valgrind_main (m_main.c:437)
|
|
# ==31040== by 0x28035F3C: _start_in_C_linux (m_main.c:2799)
|
|
# ==31040== by 0x28030B4B: ??? (in install/lib/valgrind/memcheck-x86-linux)
|
|
{
|
|
"keep duplicated args forever as tools can make copies"
|
|
Memcheck:Leak
|
|
fun:vgPlain_arena_malloc
|
|
fun:vgPlain_strdup
|
|
fun:valgrind_main
|
|
}
|
|
|
|
# ==31040== 392 bytes in 1 blocks are definitely lost in loss record 58 of 106
|
|
# ==31040== at 0x2803A367: vgPlain_arena_malloc (m_mallocfree.c:1599)
|
|
# ==31040== by 0x2803A9CF: vgPlain_malloc (m_mallocfree.c:2156)
|
|
# ==31040== by 0x280738F0: vgPlain_ii_create_image (initimg-linux.c:202)
|
|
# ==31040== by 0x280327CF: valgrind_main (m_main.c:1718)
|
|
# ==31040== by 0x28035F3C: _start_in_C_linux (m_main.c:2799)
|
|
# ==31040== by 0x28030B4B: ??? (in install/lib/valgrind/memcheck-x86-linux)
|
|
{
|
|
"LD_PRELOAD_STRING inserted in env, difficult to free"
|
|
Memcheck:Leak
|
|
fun:vgPlain_arena_malloc
|
|
fun:vgPlain_malloc
|
|
fun:vgPlain_ii_create_image
|
|
fun:valgrind_main
|
|
}
|
|
|
|
# ==32749== 400 bytes in 1 blocks are definitely lost in loss record 47 of 96
|
|
# ==32749== at 0x2803D0D7: vgPlain_arena_malloc (m_mallocfree.c:1599)
|
|
# ==32749== by 0x28072DAB: vgPlain_ii_create_image (initimg-linux.c:202)
|
|
# ==32749== by 0x28036264: valgrind_main (m_main.c:1718)
|
|
# ==32749== by 0x280392FC: _start_in_C_linux (m_main.c:2799)
|
|
# ==32749== by 0x28034920: ??? (in install/lib/valgrind/memcheck-amd64-linux)
|
|
{
|
|
"LD_PRELOAD_STRING inserted in env, difficult to free"
|
|
Memcheck:Leak
|
|
fun:vgPlain_arena_malloc
|
|
fun:vgPlain_ii_create_image
|
|
fun:valgrind_main
|
|
}
|