Here is the output from valgrind-3.2.1. The output from 3.3.1 is
similar. Notice the shell-prompt in the middle and the exit code at
the end.

repton:~/src/valgrind-bugs> valgrind --error-exitcode=42 vgt
==10322== Memcheck, a memory error detector.
==10322== Copyright (C) 2002-2006, and GNU GPL'd, by Julian Seward et al.
==10322== Using LibVEX rev 1658, a library for dynamic binary translation.
==10322== Copyright (C) 2004-2006, and GNU GPL'd, by OpenWorks LLP.
==10322== Using valgrind-3.2.1-Debian, a dynamic binary instrumentation 
framework.
==10322== Copyright (C) 2000-2006, and GNU GPL'd, by Julian Seward et al.
==10322== For more details, rerun with: -v
==10322==
==10323== Thread 2:
==10323== Conditional jump or move depends on uninitialised value(s)
==10323==    at 0x428A0CC: __pthread_manager (manager.c:128)
==10323==    by 0x42107F9: clone (clone.S:119)
==10323==
==10323== Syscall param clone(child_tidptr) contains uninitialised byte(s)
==10323==    at 0x42107EC: clone (clone.S:100)
==10323==    by 0x42107F9: clone (clone.S:119)
==10324==
==10324== Thread 3:
==10324== Invalid write of size 4
==10324==    at 0x8048724: CrashThread() (in /home/mac/src/valgrind-bugs/vgt)
==10324==    by 0x804896A: boost::detail::function::void_function_invoker0<void 
(*)(), void>::invoke(boost::detail::function::any_pointer) (in 
/home/mac/src/valgrind-bugs/vgt)
==10324==    by 0x403D03B: boost::function0<void, 
std::allocator<boost::function_base> >::operator()() const (in 
/usr/lib/libboost_thread-gcc-mt-1_33_1.so.1.33.1)
==10324==    by 0x403C9AF: (within 
/usr/lib/libboost_thread-gcc-mt-1_33_1.so.1.33.1)
==10324==    by 0x4289C50: pthread_start_thread (manager.c:310)
==10324==    by 0x42107F9: clone (clone.S:119)
==10324==  Address 0x3 is not stack'd, malloc'd or (recently) free'd
==10324==
==10324== Process terminating with default action of signal 11 (SIGSEGV)
==10324==  Access not within mapped region at address 0x3
==10324==    at 0x8048724: CrashThread() (in /home/mac/src/valgrind-bugs/vgt)
==10324==    by 0x804896A: boost::detail::function::void_function_invoker0<void 
(*)(), void>::invoke(boost::detail::function::any_pointer) (in 
/home/mac/src/valgrind-bugs/vgt)
==10324==    by 0x403D03B: boost::function0<void, 
std::allocator<boost::function_base> >::operator()() const (in 
/usr/lib/libboost_thread-gcc-mt-1_33_1.so.1.33.1)
==10324==    by 0x403C9AF: (within 
/usr/lib/libboost_thread-gcc-mt-1_33_1.so.1.33.1)
==10324==    by 0x4289C50: pthread_start_thread (manager.c:310)
==10324==    by 0x42107F9: clone (clone.S:119)
repton:~/src/valgrind-bugs> ==10323==
==10323== Thread 2:
==10323== Invalid read of size 4
==10323==    at 0x424AF7E: _nl_locale_subfreeres (setlocale.c:455)
==10323==    by 0x424ACD6: free_mem (gconv_db.c:792)
==10323==    by 0x424B431: __libc_freeres (set-freeres.c:47)
==10323==    by 0x40191F6: _vgnU_freeres (vg_preloaded.c:60)
==10323==    by 0x42DB2FF: ???
==10323==    by 0x42107F9: clone (clone.S:119)
==10323==  Address 0x0 is not stack'd, malloc'd or (recently) free'd
==10323==
==10323== Process terminating with default action of signal 11 (SIGSEGV)
==10323==  Access not within mapped region at address 0x0
==10323==    at 0x424AF7E: _nl_locale_subfreeres (setlocale.c:455)
==10323==    by 0x424ACD6: free_mem (gconv_db.c:792)
==10323==    by 0x424B431: __libc_freeres (set-freeres.c:47)
==10323==    by 0x40191F6: _vgnU_freeres (vg_preloaded.c:60)
==10323==    by 0x42DB2FF: ???
==10323==    by 0x42107F9: clone (clone.S:119)
==10323==
==10323== ERROR SUMMARY: 4 errors from 4 contexts (suppressed: 28 from 6)
==10323== malloc/free: in use at exit: 13,896 bytes in 5 blocks.
==10323== malloc/free: 5 allocs, 0 frees, 13,896 bytes allocated.
==10323== For counts of detected errors, rerun with: -v
==10323== searching for pointers to 5 not-freed blocks.
==10323== checked 8,815,656 bytes.
==10323==
==10323== LEAK SUMMARY:
==10323==    definitely lost: 0 bytes in 0 blocks.
==10323==      possibly lost: 5,736 bytes in 4 blocks.
==10323==    still reachable: 8,160 bytes in 1 blocks.
==10323==         suppressed: 0 bytes in 0 blocks.
==10323== Reachable blocks (those to which a pointer was found) are not shown.
==10323== To see them, rerun with: --show-reachable=yes

repton:~/src/valgrind-bugs> echo $?
0



-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to