|
From: Paul F. <pa...@so...> - 2021-10-09 10:39:51
|
https://sourceware.org/git/gitweb.cgi?p=valgrind.git;h=7c5d720a2b67b19cd06210d83434295ae838ea89 commit 7c5d720a2b67b19cd06210d83434295ae838ea89 Author: Paul Floyd <pj...@wa...> Date: Sat Oct 9 12:37:17 2021 +0200 FreeBSD support, patch 10 memcheck No code changes. A few modified tests. Adds new FreeBSD specific tests. Diff: --- configure.ac | 11 + memcheck/tests/Makefile.am | 28 +- memcheck/tests/addressable.c | 3 + memcheck/tests/addressable.stderr.exp | 24 +- memcheck/tests/amd64-freebsd/Makefile.am | 20 + memcheck/tests/amd64-freebsd/posix_fadvise.c | 27 + .../tests/amd64-freebsd/posix_fadvise.stderr.exp | 16 + memcheck/tests/amd64-freebsd/posix_fadvise.vgtest | 3 + memcheck/tests/amd64-freebsd/posix_fallocate.c | 19 + .../tests/amd64-freebsd/posix_fallocate.stderr.exp | 8 + .../tests/amd64-freebsd/posix_fallocate.vgtest | 3 + memcheck/tests/amd64/Makefile.am | 3 +- .../tests/amd64/insn-pmovmskb.stderr.exp-clang | 48 + .../tests/amd64/xor-undef-amd64.stderr.exp-freebsd | 26 + memcheck/tests/badjump2.c | 4 +- memcheck/tests/demangle.stderr.exp-freebsd | 0 memcheck/tests/err_disable4.c | 2 + memcheck/tests/filter_dw4 | 11 - memcheck/tests/filter_dw4.in | 13 + memcheck/tests/filter_malloc_free | 2 +- memcheck/tests/filter_overlaperror | 4 - memcheck/tests/filter_overlaperror.in | 6 + memcheck/tests/{filter_stderr => filter_stderr.in} | 6 +- memcheck/tests/filter_varinfo3 | 5 +- memcheck/tests/fprw.stderr.exp-freebsd | 35 + memcheck/tests/fprw.stderr.exp-freebsd-x86 | 41 + memcheck/tests/freebsd/Makefile.am | 93 + memcheck/tests/freebsd/access.c | 43 + memcheck/tests/freebsd/access.stderr.exp | 53 + memcheck/tests/freebsd/access.vgtest | 3 + memcheck/tests/freebsd/capsicum.c | 97 + memcheck/tests/freebsd/capsicum.stderr.exp | 41 + memcheck/tests/freebsd/capsicum.vgtest | 3 + memcheck/tests/freebsd/chflags.c | 43 + memcheck/tests/freebsd/chflags.stderr.exp | 57 + memcheck/tests/freebsd/chflags.stderr.exp-x86 | 58 + memcheck/tests/freebsd/chflags.vgtest | 4 + memcheck/tests/freebsd/chmod_chown.c | 65 + memcheck/tests/freebsd/chmod_chown.stderr.exp | 65 + memcheck/tests/freebsd/chmod_chown.vgtest | 3 + memcheck/tests/freebsd/dump_stdout | 2 + memcheck/tests/freebsd/extattr.c | 99 + memcheck/tests/freebsd/extattr.stderr.exp | 209 + memcheck/tests/freebsd/extattr.vgtest | 2 + memcheck/tests/freebsd/file_locking_wait6.c | 130 + .../tests/freebsd/file_locking_wait6.stderr.exp | 5 + memcheck/tests/freebsd/file_locking_wait6.vgtest | 2 + memcheck/tests/freebsd/filter_scalar | 12 + memcheck/tests/freebsd/filter_sigwait | 5 + memcheck/tests/freebsd/filter_stderr | 3 + memcheck/tests/freebsd/get_set_context.c | 50 + memcheck/tests/freebsd/get_set_context.stderr.exp | 40 + .../tests/freebsd/get_set_context.stderr.exp-x86 | 40 + memcheck/tests/freebsd/get_set_context.vgtest | 2 + memcheck/tests/freebsd/get_set_login.c | 15 + memcheck/tests/freebsd/get_set_login.stderr.exp | 11 + memcheck/tests/freebsd/get_set_login.vgtest | 2 + memcheck/tests/freebsd/getfh.c | 50 + memcheck/tests/freebsd/getfh.stderr.exp | 71 + memcheck/tests/freebsd/getfh.vgtest | 2 + memcheck/tests/freebsd/getfsstat.c | 33 + memcheck/tests/freebsd/getfsstat.stderr.exp | 18 + memcheck/tests/freebsd/getfsstat.stderr.exp-x86 | 21 + memcheck/tests/freebsd/getfsstat.supp | 38 + memcheck/tests/freebsd/getfsstat.vgtest | 4 + memcheck/tests/freebsd/inlinfo.c | 11 + memcheck/tests/freebsd/inlinfo_nested.c | 78 + memcheck/tests/freebsd/linkat.c | 85 + memcheck/tests/freebsd/linkat.stderr.exp | 94 + memcheck/tests/freebsd/linkat.vgtest | 2 + memcheck/tests/freebsd/misc.c | 63 + memcheck/tests/freebsd/misc.stderr.exp | 32 + memcheck/tests/freebsd/misc.vgtest | 3 + memcheck/tests/freebsd/pdfork_pdkill.c | 101 + memcheck/tests/freebsd/pdfork_pdkill.stderr.exp | 41 + memcheck/tests/freebsd/pdfork_pdkill.vgtest | 4 + memcheck/tests/freebsd/revoke.c | 21 + memcheck/tests/freebsd/revoke.stderr.exp | 11 + memcheck/tests/freebsd/revoke.vgtest | 3 + memcheck/tests/freebsd/scalar.c | 2042 ++++++++ memcheck/tests/freebsd/scalar.h | 39 + memcheck/tests/freebsd/scalar.stderr.exp | 5310 +++++++++++++++++++ .../tests/freebsd/scalar.stderr.exp-freebsd130 | 5313 +++++++++++++++++++ memcheck/tests/freebsd/scalar.stderr.exp-x86 | 5371 ++++++++++++++++++++ memcheck/tests/freebsd/scalar.vgtest | 11 + memcheck/tests/freebsd/scalar_abort2.c | 14 + memcheck/tests/freebsd/scalar_abort2.stderr.exp | 25 + memcheck/tests/freebsd/scalar_abort2.vgtest | 2 + memcheck/tests/freebsd/scalar_fork.c | 11 + memcheck/tests/freebsd/scalar_fork.stderr.exp | 3 + memcheck/tests/freebsd/scalar_fork.vgtest | 2 + memcheck/tests/freebsd/scalar_pdfork.c | 14 + memcheck/tests/freebsd/scalar_pdfork.stderr.exp | 11 + memcheck/tests/freebsd/scalar_pdfork.vgtest | 2 + memcheck/tests/freebsd/scalar_thr_exit.c | 14 + memcheck/tests/freebsd/scalar_thr_exit.stderr.exp | 12 + memcheck/tests/freebsd/scalar_thr_exit.vgtest | 2 + memcheck/tests/freebsd/scalar_vfork.c | 11 + memcheck/tests/freebsd/scalar_vfork.stderr.exp | 3 + memcheck/tests/freebsd/scalar_vfork.vgtest | 2 + memcheck/tests/freebsd/sigwait.c | 68 + memcheck/tests/freebsd/sigwait.stderr.exp | 22 + memcheck/tests/freebsd/sigwait.stderr.exp-x86 | 24 + memcheck/tests/freebsd/sigwait.stdout.exp | 3 + memcheck/tests/freebsd/sigwait.vgtest | 3 + memcheck/tests/freebsd/stat.c | 71 + memcheck/tests/freebsd/stat.stderr.exp | 49 + memcheck/tests/freebsd/stat.stderr.exp-x86 | 49 + memcheck/tests/freebsd/stat.vgtest | 3 + memcheck/tests/freebsd/statfs.c | 46 + memcheck/tests/freebsd/statfs.stderr.exp | 47 + memcheck/tests/freebsd/statfs.vgtest | 3 + memcheck/tests/freebsd/static_allocs.c | 39 + memcheck/tests/freebsd/static_allocs.stderr.exp | 5 + memcheck/tests/freebsd/static_allocs.vgtest | 2 + memcheck/tests/freebsd/supponlyobj.stderr.exp | 8 + memcheck/tests/freebsd/supponlyobj.supp | 16 + memcheck/tests/freebsd/supponlyobj.vgtest | 4 + memcheck/tests/freebsd/utimens.c | 57 + memcheck/tests/freebsd/utimens.stderr.exp | 36 + memcheck/tests/freebsd/utimens.vgtest | 3 + memcheck/tests/freebsd/utimes.c | 99 + memcheck/tests/freebsd/utimes.stderr.exp | 96 + memcheck/tests/freebsd/utimes.stderr.exp-x86 | 96 + memcheck/tests/freebsd/utimes.vgtest | 2 + .../tests/leak-autofreepool-5.stderr.exp-freebsd | 34 + memcheck/tests/leak-segv-jmp.c | 96 + memcheck/tests/leak-segv-jmp.stderr.exp | 20 +- .../tests/leak_cpp_interior.stderr.exp-freebsd | 131 + memcheck/tests/libstdc++.supp | 10 + memcheck/tests/manuel1.stderr.exp-freebsd-clang | 28 + memcheck/tests/memalign2.c | 2 + .../tests/memalign_test.stderr.exp-freebsd-clang | 10 + memcheck/tests/origin1-yes.stderr.exp-freebsd | 29 + .../tests/origin2-not-quite.stderr.exp-freebsd | 11 + memcheck/tests/origin3-no.stderr.exp-freebsd | 22 + memcheck/tests/origin4-many.c | 16 +- memcheck/tests/origin5-bz2.stderr.exp-freebsd | 158 + memcheck/tests/origin5-bz2.stderr.exp-freebsd-x86 | 158 + memcheck/tests/sendmsg.stderr.exp-freebsd | 20 + memcheck/tests/sendmsg.stderr.exp-freebsd-x86 | 20 + memcheck/tests/sigkill.stderr.exp-freebsd | 197 + memcheck/tests/str_tester.c | 26 +- memcheck/tests/supp_unknown.supp | 8 + memcheck/tests/supponlyobj.vgtest | 3 +- memcheck/tests/test-plo-no.stderr.exp-le32-freebsd | 18 + .../test-plo-no.stderr.exp-le32-freebsd-clang | 20 + memcheck/tests/test-plo-no.stderr.exp-le64-freebsd | 20 + memcheck/tests/thread_alloca.c | 2 + memcheck/tests/varinfo1.c | 4 +- memcheck/tests/varinfo1.stderr.exp | 2 +- memcheck/tests/varinfo1.stderr.exp-freebsd | 37 + memcheck/tests/varinfo1.vgtest | 1 + memcheck/tests/varinfo2.c | 4 +- memcheck/tests/varinfo2.stderr.exp | 6 +- memcheck/tests/varinfo2.stderr.exp-ppc64 | 6 +- memcheck/tests/varinfo2.vgtest | 1 + memcheck/tests/varinfo3.c | 4 +- memcheck/tests/varinfo3.stderr.exp | 4 +- memcheck/tests/varinfo3.stderr.exp-freebsd | 58 + memcheck/tests/varinfo4.c | 4 +- memcheck/tests/varinfo4.stderr.exp-freebsd | 21 + memcheck/tests/varinfo5.stderr.exp | 20 +- memcheck/tests/varinfo5.stderr.exp-ppc64 | 16 +- memcheck/tests/varinfo5so.c | 4 +- memcheck/tests/varinfo6.c | 4 +- memcheck/tests/vbit-test/util.c | 6 +- memcheck/tests/vbit-test/vbits.c | 6 +- memcheck/tests/wrap6.c | 19 + memcheck/tests/x86-freebsd/Makefile.am | 21 + memcheck/tests/x86-freebsd/posix_fadvise.c | 27 + .../tests/x86-freebsd/posix_fadvise.stderr.exp | 24 + memcheck/tests/x86-freebsd/posix_fadvise.vgtest | 3 + memcheck/tests/x86-freebsd/posix_fallocate.c | 19 + .../tests/x86-freebsd/posix_fallocate.stderr.exp | 16 + memcheck/tests/x86-freebsd/posix_fallocate.vgtest | 3 + memcheck/tests/x86/filter_pushfpopf | 5 - memcheck/tests/x86/filter_pushfpopf.in | 7 + memcheck/tests/x86/pushfpopf_s.S | 6 +- 179 files changed, 22775 insertions(+), 118 deletions(-) diff --git a/configure.ac b/configure.ac index 3f2a73ee27..39e619575e 100755 --- a/configure.ac +++ b/configure.ac @@ -5141,11 +5141,14 @@ AC_CONFIG_FILES([ memcheck/tests/linux/debuginfod-check.vgtest memcheck/tests/darwin/Makefile memcheck/tests/solaris/Makefile + memcheck/tests/freebsd/Makefile memcheck/tests/amd64-linux/Makefile memcheck/tests/arm64-linux/Makefile memcheck/tests/x86-linux/Makefile memcheck/tests/amd64-solaris/Makefile memcheck/tests/x86-solaris/Makefile + memcheck/tests/amd64-freebsd/Makefile + memcheck/tests/x86-freebsd/Makefile memcheck/tests/ppc32/Makefile memcheck/tests/ppc64/Makefile memcheck/tests/s390x/Makefile @@ -5216,6 +5219,14 @@ AC_CONFIG_FILES([tests/filter_stderr_basic], [chmod +x tests/filter_stderr_basic]) AC_CONFIG_FILES([tests/filter_discards], [chmod +x tests/filter_discards]) +AC_CONFIG_FILES([memcheck/tests/filter_stderr], + [chmod +x memcheck/tests/filter_stderr]) +AC_CONFIG_FILES([memcheck/tests/filter_dw4], + [chmod +x memcheck/tests/filter_dw4]) +AC_CONFIG_FILES([memcheck/tests/filter_overlaperror], + [chmod +x memcheck/tests/filter_overlaperror]) +AC_CONFIG_FILES([memcheck/tests/x86/filter_pushfpopf], + [chmod +x memcheck/tests/x86/filter_pushfpopf]) AC_CONFIG_FILES([gdbserver_tests/filter_gdb], [chmod +x gdbserver_tests/filter_gdb]) AC_CONFIG_FILES([gdbserver_tests/filter_memcheck_monitor], diff --git a/memcheck/tests/Makefile.am b/memcheck/tests/Makefile.am index 9fe8082b94..3ce33af181 100644 --- a/memcheck/tests/Makefile.am +++ b/memcheck/tests/Makefile.am @@ -66,6 +66,7 @@ endif DIST_SUBDIRS = x86 amd64 ppc32 ppc64 s390x linux \ darwin solaris x86-linux amd64-linux arm64-linux \ x86-solaris amd64-solaris mips32 mips64 \ + freebsd amd64-freebsd x86-freebsd \ common . dist_noinst_SCRIPTS = \ @@ -138,11 +139,13 @@ EXTRA_DIST = \ cxx17_aligned_new.stdout.exp \ deep-backtrace.vgtest deep-backtrace.stderr.exp \ demangle.stderr.exp demangle.vgtest \ + demangle.stderr.exp-freebsd \ big_debuginfo_symbol.stderr.exp big_debuginfo_symbol.vgtest \ describe-block.stderr.exp describe-block.vgtest \ descr_belowsp.vgtest descr_belowsp.stderr.exp \ doublefree.stderr.exp doublefree.vgtest \ dw4.vgtest dw4.stderr.exp dw4.stderr.exp-solaris dw4.stdout.exp \ + dw4.stderr.exp-freebsd \ err_disable1.vgtest err_disable1.stderr.exp \ err_disable2.vgtest err_disable2.stderr.exp \ err_disable3.vgtest err_disable3.stderr.exp \ @@ -155,8 +158,9 @@ EXTRA_DIST = \ execve1.stderr.exp execve1.vgtest execve1.stderr.exp-kfail \ execve2.stderr.exp execve2.vgtest execve2.stderr.exp-kfail \ file_locking.stderr.exp file_locking.vgtest \ - fprw.stderr.exp fprw.stderr.exp-mips32-be fprw.stderr.exp-mips32-le \ - fprw.vgtest \ + fprw.stderr.exp fprw.stderr.exp-freebsd fprw.stderr.exp-mips32-be \ + fprw.stderr.exp-mips32-le fprw.vgtest \ + fprw.stderr.exp-freebsd-x86 \ fwrite.stderr.exp fwrite.vgtest fwrite.stderr.exp-kfail \ gone_abrt_xml.vgtest gone_abrt_xml.stderr.exp gone_abrt_xml.stderr.exp-solaris \ holey_buffer_too_small.vgtest holey_buffer_too_small.stdout.exp \ @@ -186,6 +190,7 @@ EXTRA_DIST = \ leak-autofreepool-4.vgtest leak-autofreepool-4.stderr.exp \ leak-autofreepool-5.vgtest leak-autofreepool-5.stderr.exp \ leak-autofreepool-6.vgtest leak-autofreepool-6.stderr.exp \ + leak-autofreepool-5.stderr.exp-freebsd \ leak-tree.vgtest leak-tree.stderr.exp \ leak-segv-jmp.vgtest leak-segv-jmp.stderr.exp \ lks.vgtest lks.stdout.exp lks.supp lks.stderr.exp \ @@ -204,11 +209,13 @@ EXTRA_DIST = \ malloc2.stderr.exp malloc2.vgtest \ malloc3.stderr.exp malloc3.stdout.exp malloc3.vgtest \ manuel1.stderr.exp manuel1.stdout.exp manuel1.vgtest \ + manuel1.stderr.exp-freebsd-clang \ manuel2.stderr.exp manuel2.stderr.exp64 manuel2.stdout.exp \ manuel2.vgtest \ manuel3.stderr.exp manuel3.vgtest \ match-overrun.stderr.exp match-overrun.vgtest match-overrun.supp \ memalign_test.stderr.exp memalign_test.vgtest \ + memalign_test.stderr.exp-freebsd-clang \ memalign2.stderr.exp memalign2.vgtest \ memcmptest.stderr.exp memcmptest.stderr.exp2 \ memcmptest.stdout.exp memcmptest.vgtest \ @@ -225,9 +232,12 @@ EXTRA_DIST = \ noisy_child.vgtest noisy_child.stderr.exp noisy_child.stdout.exp \ null_socket.stderr.exp null_socket.vgtest \ origin1-yes.vgtest origin1-yes.stdout.exp origin1-yes.stderr.exp \ + origin1-yes.stderr.exp-freebsd \ origin2-not-quite.vgtest origin2-not-quite.stdout.exp \ origin2-not-quite.stderr.exp \ + origin2-not-quite.stderr.exp-freebsd \ origin3-no.vgtest origin3-no.stdout.exp \ + origin3-no.stderr.exp-freebsd \ origin3-no.stderr.exp \ origin4-many.vgtest origin4-many.stdout.exp \ origin4-many.stderr.exp \ @@ -238,6 +248,8 @@ EXTRA_DIST = \ origin5-bz2.stderr.exp-glibc27-ppc64 \ origin5-bz2.stderr.exp-glibc212-s390x \ origin5-bz2.stderr.exp-glibc234-s390x \ + origin5-bz2.stderr.exp-freebsd \ + origin5-bz2.stderr.exp-freebsd-x86 \ origin5-bz2.stderr.exp-glibc218-mips32 \ origin6-fp.vgtest origin6-fp.stdout.exp \ origin6-fp.stderr.exp-glibc25-amd64 \ @@ -272,11 +284,13 @@ EXTRA_DIST = \ sbfragment.stdout.exp sbfragment.stderr.exp sbfragment.vgtest \ sem.stderr.exp sem.vgtest \ sendmsg.stderr.exp sendmsg.stderr.exp-solaris sendmsg.vgtest \ + sendmsg.stderr.exp-freebsd \ + sendmsg.stderr.exp-freebsd-x86 \ sh-mem.stderr.exp sh-mem.vgtest \ sh-mem-random.stderr.exp sh-mem-random.stdout.exp64 \ sh-mem-random.stdout.exp sh-mem-random.vgtest \ sigaltstack.stderr.exp sigaltstack.vgtest \ - sigkill.stderr.exp sigkill.stderr.exp-darwin sigkill.stderr.exp-mips32 \ + sigkill.stderr.exp sigkill.stderr.exp-darwin sigkill.stderr.exp-freebsd sigkill.stderr.exp-mips32 \ sigkill.stderr.exp-solaris \ sigkill.stderr.exp-glibc-2.28 sigkill.vgtest \ signal2.stderr.exp signal2.stdout.exp signal2.vgtest \ @@ -302,6 +316,8 @@ EXTRA_DIST = \ suppvarinfo5.stderr.exp suppvarinfo5.supp suppvarinfo5.vgtest \ test-plo-no.vgtest test-plo-no.stdout.exp \ test-plo-no.stderr.exp-le64 test-plo-no.stderr.exp-le32 \ + test-plo-no.stderr.exp-le32-freebsd test-plo-no.stderr.exp-le64-freebsd \ + test-plo-no.stderr.exp-le32-freebsd-clang \ test-plo-yes.vgtest test-plo-yes.stdout.exp \ test-plo-yes.stderr.exp-le64 test-plo-yes.stderr.exp-le32 \ test-plo-no.stderr.exp-s390x-mvc \ @@ -314,12 +330,15 @@ EXTRA_DIST = \ unit_oset.stderr.exp unit_oset.stdout.exp unit_oset.vgtest \ varinfo1.vgtest varinfo1.stdout.exp varinfo1.stderr.exp \ varinfo1.stderr.exp-ppc64 \ + varinfo1.stderr.exp-freebsd \ varinfo2.vgtest varinfo2.stdout.exp varinfo2.stderr.exp \ varinfo2.stderr.exp-ppc64 \ varinfo3.vgtest varinfo3.stdout.exp varinfo3.stderr.exp \ varinfo3.stderr.exp-ppc64 \ + varinfo3.stderr.exp-freebsd \ varinfo4.vgtest varinfo4.stdout.exp varinfo4.stderr.exp \ varinfo4.stderr.exp-ppc64 \ + varinfo4.stderr.exp-freebsd \ varinfo5.vgtest varinfo5.stdout.exp varinfo5.stderr.exp \ varinfo5.stderr.exp-ppc64 \ varinfo6.vgtest varinfo6.stdout.exp varinfo6.stderr.exp \ @@ -344,7 +363,8 @@ EXTRA_DIST = \ wrapmallocstatic.vgtest wrapmallocstatic.stdout.exp \ wrapmallocstatic.stderr.exp \ writev1.stderr.exp writev1.stderr.exp-solaris writev1.vgtest \ - xml1.stderr.exp xml1.stdout.exp xml1.vgtest xml1.stderr.exp-s390x-mvc + xml1.stderr.exp xml1.stdout.exp xml1.vgtest xml1.stderr.exp-s390x-mvc \ + leak_cpp_interior.stderr.exp-freebsd check_PROGRAMS = \ accounting \ diff --git a/memcheck/tests/addressable.c b/memcheck/tests/addressable.c index 5f3c2e182e..568fbb45ed 100644 --- a/memcheck/tests/addressable.c +++ b/memcheck/tests/addressable.c @@ -9,6 +9,9 @@ #include <errno.h> #include <string.h> #include <stdlib.h> +#if defined(VGO_freebsd) +#include <signal.h> +#endif static int pgsz; diff --git a/memcheck/tests/addressable.stderr.exp b/memcheck/tests/addressable.stderr.exp index 4c121987d6..533d6e9bb1 100644 --- a/memcheck/tests/addressable.stderr.exp +++ b/memcheck/tests/addressable.stderr.exp @@ -9,20 +9,20 @@ For a detailed leak analysis, rerun with: --leak-check=full For lists of detected and suppressed errors, rerun with: -s ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0) Unaddressable byte(s) found during client check request - at 0x........: test2 (addressable.c:48) - by 0x........: main (addressable.c:125) + at 0x........: test2 (addressable.c:51) + by 0x........: main (addressable.c:128) Address 0x........ is not stack'd, malloc'd or (recently) free'd Invalid write of size 1 - at 0x........: test2 (addressable.c:51) - by 0x........: main (addressable.c:125) + at 0x........: test2 (addressable.c:54) + by 0x........: main (addressable.c:128) Address 0x........ is not stack'd, malloc'd or (recently) free'd Process terminating with default action of signal N (SIGSEGV or SIGBUS) Bad memory (SIGSEGV or SIGBUS) at address 0x........ - at 0x........: test2 (addressable.c:51) - by 0x........: main (addressable.c:125) + at 0x........: test2 (addressable.c:54) + by 0x........: main (addressable.c:128) If you believe this happened as a result of a stack overflow in your program's main thread (unlikely but possible), you can try to increase the size of the @@ -49,8 +49,8 @@ ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0) Process terminating with default action of signal N (SIGSEGV or SIGBUS) Bad memory (SIGSEGV or SIGBUS) at address 0x........ - at 0x........: test4 (addressable.c:74) - by 0x........: main (addressable.c:125) + at 0x........: test4 (addressable.c:77) + by 0x........: main (addressable.c:128) HEAP SUMMARY: in use at exit: ... bytes in ... blocks @@ -61,13 +61,13 @@ For a detailed leak analysis, rerun with: --leak-check=full For lists of detected and suppressed errors, rerun with: -s ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0) Uninitialised byte(s) found during client check request - at 0x........: test5 (addressable.c:85) - by 0x........: main (addressable.c:125) + at 0x........: test5 (addressable.c:88) + by 0x........: main (addressable.c:128) Address 0x........ is in a rw- anonymous segment Uninitialised byte(s) found during client check request - at 0x........: test5 (addressable.c:91) - by 0x........: main (addressable.c:125) + at 0x........: test5 (addressable.c:94) + by 0x........: main (addressable.c:128) Address 0x........ is in a r-- anonymous segment diff --git a/memcheck/tests/amd64-freebsd/Makefile.am b/memcheck/tests/amd64-freebsd/Makefile.am new file mode 100644 index 0000000000..80854419dd --- /dev/null +++ b/memcheck/tests/amd64-freebsd/Makefile.am @@ -0,0 +1,20 @@ + +include $(top_srcdir)/Makefile.tool-tests.am + +dist_noinst_SCRIPTS = filter_stderr + +EXTRA_DIST = \ + posix_fadvise.vgtest \ + posix_fallocate.vgtest \ + posix_fadvise.stderr.exp \ + posix_fallocate.stderr.exp + +check_PROGRAMS = \ + posix_fadvise posix_fallocate + +AM_CFLAGS += @FLAG_M64@ +AM_CXXFLAGS += @FLAG_M64@ +AM_CCASFLAGS += @FLAG_M64@ + +posix_fallocate_CFLAGS = $(AM_CFLAGS) @FLAG_W_NO_UNINITIALIZED@ +posix_fadvise_CFLAGS = $(AM_CFLAGS) @FLAG_W_NO_UNINITIALIZED@ diff --git a/memcheck/tests/amd64-freebsd/posix_fadvise.c b/memcheck/tests/amd64-freebsd/posix_fadvise.c new file mode 100644 index 0000000000..2ba2005ae6 --- /dev/null +++ b/memcheck/tests/amd64-freebsd/posix_fadvise.c @@ -0,0 +1,27 @@ +#include <fcntl.h> +#include <stdio.h> +#include <errno.h> + +int main(void) +{ + int fd = open("foo", O_RDWR|O_CREAT, 0666); + if (fd < 0) return 1; + posix_fadvise( fd, 0, 4096, POSIX_FADV_WILLNEED ); + posix_fadvise( fd, 0, 0, POSIX_FADV_NOREUSE ); + + int badfd = 42; + posix_fadvise( badfd, 0, 4096, POSIX_FADV_WILLNEED ); + + int x; + posix_fadvise(x, 1, 2, POSIX_FADV_NORMAL); + posix_fadvise(badfd, x, 2, POSIX_FADV_NORMAL); + posix_fadvise(badfd, 1, x, POSIX_FADV_NORMAL); + posix_fadvise(badfd, 1, 2, x); + + x = posix_fadvise(badfd + , 1, 2, POSIX_FADV_NORMAL); + + if (x != EBADF) + fprintf(stderr, "Unexpected return value: %d\n", x); +} + diff --git a/memcheck/tests/amd64-freebsd/posix_fadvise.stderr.exp b/memcheck/tests/amd64-freebsd/posix_fadvise.stderr.exp new file mode 100644 index 0000000000..3fb69d8413 --- /dev/null +++ b/memcheck/tests/amd64-freebsd/posix_fadvise.stderr.exp @@ -0,0 +1,16 @@ +Syscall param posix_fadvise(fd) contains uninitialised byte(s) + at 0x........: posix_fadvise (in /...libc...) + by 0x........: main (posix_fadvise.c:16) + +Syscall param posix_fadvise(offset) contains uninitialised byte(s) + at 0x........: posix_fadvise (in /...libc...) + by 0x........: main (posix_fadvise.c:17) + +Syscall param posix_fadvise(len) contains uninitialised byte(s) + at 0x........: posix_fadvise (in /...libc...) + by 0x........: main (posix_fadvise.c:18) + +Syscall param posix_fadvise(advice) contains uninitialised byte(s) + at 0x........: posix_fadvise (in /...libc...) + by 0x........: main (posix_fadvise.c:19) + diff --git a/memcheck/tests/amd64-freebsd/posix_fadvise.vgtest b/memcheck/tests/amd64-freebsd/posix_fadvise.vgtest new file mode 100644 index 0000000000..6353a958cb --- /dev/null +++ b/memcheck/tests/amd64-freebsd/posix_fadvise.vgtest @@ -0,0 +1,3 @@ +prog: posix_fadvise +vgopts: -q +cleanup: rm -f foo diff --git a/memcheck/tests/amd64-freebsd/posix_fallocate.c b/memcheck/tests/amd64-freebsd/posix_fallocate.c new file mode 100644 index 0000000000..8c04594379 --- /dev/null +++ b/memcheck/tests/amd64-freebsd/posix_fallocate.c @@ -0,0 +1,19 @@ +#include <fcntl.h> +#include <stdio.h> +#include <errno.h> + +int main(void) +{ + int fd = open("foo", O_RDWR|O_CREAT, 0666); + if (fd < 0) return 1; + posix_fallocate(fd, 0, 400000); + + int badfd = 42; + int x; + posix_fallocate(badfd, x, 20); + posix_fallocate(badfd, 0, x); + x = posix_fallocate(badfd, 0, 20); + if (x != EBADF) + fprintf(stderr, "Unexpected return value: %d\n", x); +} + diff --git a/memcheck/tests/amd64-freebsd/posix_fallocate.stderr.exp b/memcheck/tests/amd64-freebsd/posix_fallocate.stderr.exp new file mode 100644 index 0000000000..063b6d98ba --- /dev/null +++ b/memcheck/tests/amd64-freebsd/posix_fallocate.stderr.exp @@ -0,0 +1,8 @@ +Syscall param posix_fallocate(offset) contains uninitialised byte(s) + at 0x........: posix_fallocate (in /...libc...) + by 0x........: main (posix_fallocate.c:13) + +Syscall param posix_fallocate(len) contains uninitialised byte(s) + at 0x........: posix_fallocate (in /...libc...) + by 0x........: main (posix_fallocate.c:14) + diff --git a/memcheck/tests/amd64-freebsd/posix_fallocate.vgtest b/memcheck/tests/amd64-freebsd/posix_fallocate.vgtest new file mode 100644 index 0000000000..28954e87fe --- /dev/null +++ b/memcheck/tests/amd64-freebsd/posix_fallocate.vgtest @@ -0,0 +1,3 @@ +prog: posix_fallocate +vgopts: -q +cleanup: rm -f foo diff --git a/memcheck/tests/amd64/Makefile.am b/memcheck/tests/amd64/Makefile.am index da15cf797a..d5c94f68a0 100644 --- a/memcheck/tests/amd64/Makefile.am +++ b/memcheck/tests/amd64/Makefile.am @@ -17,6 +17,7 @@ EXTRA_DIST = \ insn-bsfl.vgtest insn-bsfl.stdout.exp insn-bsfl.stderr.exp \ insn-pcmpistri.vgtest insn-pcmpistri.stdout.exp insn-pcmpistri.stderr.exp \ insn-pmovmskb.vgtest insn-pmovmskb.stdout.exp insn-pmovmskb.stderr.exp \ + insn-pmovmskb.stderr.exp-clang \ more_x87_fp.stderr.exp more_x87_fp.stdout.exp more_x87_fp.vgtest \ sh-mem-vec128-plo-no.vgtest \ sh-mem-vec128-plo-no.stderr.exp \ @@ -33,7 +34,7 @@ EXTRA_DIST = \ shr_edx.stderr.exp shr_edx.stdout.exp shr_edx.vgtest \ sse_memory.stderr.exp sse_memory.stdout.exp sse_memory.vgtest \ xor-undef-amd64.stderr.exp xor-undef-amd64.stdout.exp \ - xor-undef-amd64.vgtest \ + xor-undef-amd64.stderr.exp-freebsd xor-undef-amd64.vgtest \ xsave-avx.vgtest xsave-avx.stdout.exp xsave-avx.stderr.exp check_PROGRAMS = \ diff --git a/memcheck/tests/amd64/insn-pmovmskb.stderr.exp-clang b/memcheck/tests/amd64/insn-pmovmskb.stderr.exp-clang new file mode 100644 index 0000000000..6d32a1f331 --- /dev/null +++ b/memcheck/tests/amd64/insn-pmovmskb.stderr.exp-clang @@ -0,0 +1,48 @@ +Conditional jump or move depends on uninitialised value(s) + ... + by 0x........: use (insn-pmovmskb.c:48) + by 0x........: doit (insn-pmovmskb.c:69) + by 0x........: main (insn-pmovmskb.c:140) + +Use of uninitialised value of size 8 + ... + by 0x........: use (insn-pmovmskb.c:48) + by 0x........: doit (insn-pmovmskb.c:69) + by 0x........: main (insn-pmovmskb.c:140) + +Use of uninitialised value of size 8 + ... + by 0x........: use (insn-pmovmskb.c:48) + by 0x........: doit (insn-pmovmskb.c:69) + by 0x........: main (insn-pmovmskb.c:140) + +Use of uninitialised value of size 8 + ... + by 0x........: use (insn-pmovmskb.c:48) + by 0x........: doit (insn-pmovmskb.c:69) + by 0x........: main (insn-pmovmskb.c:140) + +0: Invalid value is false +1: Invalid value is false +2: Invalid value is false +3: Invalid value is false +4: Invalid value is false +5: Invalid value is false +6: Invalid value is false +7: Invalid value is false +8: Invalid value is false +9: Invalid value is false +10: Invalid value is false +11: Invalid value is false +12: Invalid value is false +13: Invalid value is false +14: Invalid value is false +15: Invalid value is false +4: Invalid value is true +5: Invalid value is true +6: Invalid value is true +7: Invalid value is true +8: Invalid value is true +9: Invalid value is true +12: Invalid value is true +13: Invalid value is true diff --git a/memcheck/tests/amd64/xor-undef-amd64.stderr.exp-freebsd b/memcheck/tests/amd64/xor-undef-amd64.stderr.exp-freebsd new file mode 100755 index 0000000000..0bfff27098 --- /dev/null +++ b/memcheck/tests/amd64/xor-undef-amd64.stderr.exp-freebsd @@ -0,0 +1,26 @@ + +Conditional jump or move depends on uninitialised value(s) + at 0x........: main (xor-undef-amd64.c:17) + +Conditional jump or move depends on uninitialised value(s) + at 0x........: main (xor-undef-amd64.c:38) + +Conditional jump or move depends on uninitialised value(s) + at 0x........: main (xor-undef-amd64.c:65) + +Conditional jump or move depends on uninitialised value(s) + at 0x........: main (xor-undef-amd64.c:92) + +Conditional jump or move depends on uninitialised value(s) + at 0x........: main (xor-undef-amd64.c:117) + + +HEAP SUMMARY: + in use at exit: 4,096 bytes in 1 blocks + total heap usage: 2 allocs, 1 frees, 4,144 bytes allocated + +For a detailed leak analysis, rerun with: --leak-check=full + +For counts of detected and suppressed errors, rerun with: -v +Use --track-origins=yes to see where uninitialised values come from +ERROR SUMMARY: 5 errors from 5 contexts (suppressed: 0 from 0) diff --git a/memcheck/tests/badjump2.c b/memcheck/tests/badjump2.c index 2085a30d9e..ae858e7733 100644 --- a/memcheck/tests/badjump2.c +++ b/memcheck/tests/badjump2.c @@ -3,6 +3,7 @@ #include <signal.h> #include <stdio.h> #include <stdlib.h> +#include <string.h> // Regression test for bug 91162: if a client had a SEGV signal handler, // and jumped to a bogus address, Valgrind would abort. With the fix, @@ -22,9 +23,10 @@ int main(void) int res; /* Install own SIGSEGV handler */ + memset(&sigsegv_new, 0, sizeof(sigsegv_new)); sigsegv_new.sa_handler = SIGSEGV_handler; sigsegv_new.sa_flags = 0; -#if !defined(__APPLE__) && !defined(__sun) +#if !defined(__APPLE__) && !defined(__sun) && !defined(__FreeBSD__) sigsegv_new.sa_restorer = NULL; #endif res = sigemptyset( &sigsegv_new.sa_mask ); diff --git a/memcheck/tests/demangle.stderr.exp-freebsd b/memcheck/tests/demangle.stderr.exp-freebsd new file mode 100644 index 0000000000..e69de29bb2 diff --git a/memcheck/tests/err_disable4.c b/memcheck/tests/err_disable4.c index 44487afd2f..0692192ec8 100644 --- a/memcheck/tests/err_disable4.c +++ b/memcheck/tests/err_disable4.c @@ -94,7 +94,9 @@ int main ( void ) pthread_attr_t attr; r = pthread_attr_init(&attr); assert(!r); +#if !defined(VGO_freebsd) r = pthread_attr_setstacksize(&attr, PTHREAD_STACK_MIN); +#endif // create N threads to do child_fn_1 ... for (i = 0; i < NTHREADS; i++) { diff --git a/memcheck/tests/filter_dw4 b/memcheck/tests/filter_dw4 deleted file mode 100755 index b192bb91b7..0000000000 --- a/memcheck/tests/filter_dw4 +++ /dev/null @@ -1,11 +0,0 @@ -#! /bin/sh - -# Size of structure s1 differs between 32-bit and 64-bit programs. -sed "s/inside a block of size [0-9]* alloc'd/inside a block of size ... alloc'd/" | - -# remove directory name and pid from mapped filename -sed "s/file .*valgrind-dw4-test.[1-9][0-9]*/file valgrind-dw4-test.PID/" | - -./filter_stderr "$@" - -exit 0 diff --git a/memcheck/tests/filter_dw4.in b/memcheck/tests/filter_dw4.in new file mode 100755 index 0000000000..b217ad57ca --- /dev/null +++ b/memcheck/tests/filter_dw4.in @@ -0,0 +1,13 @@ +#! /bin/sh + +SED=@SED@ + +# Size of structure s1 differs between 32-bit and 64-bit programs. +$SED "s/inside a block of size [0-9]* alloc'd/inside a block of size ... alloc'd/" | + +# remove directory name and pid from mapped filename +$SED "s/file .*valgrind-dw4-test.[1-9][0-9]*/file valgrind-dw4-test.PID/" | + +./filter_stderr "$@" + +exit 0 diff --git a/memcheck/tests/filter_malloc_free b/memcheck/tests/filter_malloc_free index 0f43cf2e1d..9d4c52559c 100755 --- a/memcheck/tests/filter_malloc_free +++ b/memcheck/tests/filter_malloc_free @@ -2,5 +2,5 @@ ./filter_stderr "$@" | ./filter_allocs | -sed -e '/^malloc/d;/^free/d' +sed -e '/^malloc/d;/^free/d;/^calloc/d' diff --git a/memcheck/tests/filter_overlaperror b/memcheck/tests/filter_overlaperror deleted file mode 100755 index bd477b7351..0000000000 --- a/memcheck/tests/filter_overlaperror +++ /dev/null @@ -1,4 +0,0 @@ -#! /bin/sh - -./filter_allocs "$@" | -sed 's/\(Memcheck: mc_leakcheck.c:\)[0-9]*\(.*impossible.*happened.*\)/\1...\2/' diff --git a/memcheck/tests/filter_overlaperror.in b/memcheck/tests/filter_overlaperror.in new file mode 100755 index 0000000000..3c853c0480 --- /dev/null +++ b/memcheck/tests/filter_overlaperror.in @@ -0,0 +1,6 @@ +#! /bin/sh + +SED=@SED@ + +./filter_allocs "$@" | +$SED 's/\(Memcheck: mc_leakcheck.c:\)[0-9]*\(.*impossible.*happened.*\)/\1...\2/' diff --git a/memcheck/tests/filter_stderr b/memcheck/tests/filter_stderr.in similarity index 90% rename from memcheck/tests/filter_stderr rename to memcheck/tests/filter_stderr.in index c6f6cd439f..a410fa89e7 100755 --- a/memcheck/tests/filter_stderr +++ b/memcheck/tests/filter_stderr.in @@ -2,20 +2,22 @@ dir=`dirname $0` +SED=@SED@ + $dir/../../tests/filter_stderr_basic | # Anonymise addresses $dir/../../tests/filter_addresses | # Remove "Memcheck, ..." line and the following copyright line. -sed "/^Memcheck, a memory error detector/ , /./ d" | +$SED "/^Memcheck, a memory error detector/ , /./ d" | # Replace exit_group() with exit(), because you can get either on Linux # depending on the system. perl -p -e "s/param exit_group\(status\)/param exit(status)/" | # Leak check filtering. -sed "s/checked [0-9,]* bytes./checked ... bytes./" | +$SED "s/checked [0-9,]* bytes./checked ... bytes./" | # More leak check filtering. For systems that do extra libc allocations # (eg. Darwin) there may be extra (reachable, and thus not shown) loss diff --git a/memcheck/tests/filter_varinfo3 b/memcheck/tests/filter_varinfo3 index dbf25eee5b..9f0a31c091 100755 --- a/memcheck/tests/filter_varinfo3 +++ b/memcheck/tests/filter_varinfo3 @@ -4,4 +4,7 @@ ./filter_stderr "$@" | sed "s/static_local_def\.[0-9]*/static_local_def\.XXXX/g" | -sed "s/static_local_undef\.[0-9]*/static_local_undef\.XXXX/g" +sed "s/static_local_undef\.[0-9]*/static_local_undef\.XXXX/g" | +sed "s/foo.static_local_undef/static_local_undef.XXXX/g" | +sed "s/frame #./frame #X/g" + diff --git a/memcheck/tests/fprw.stderr.exp-freebsd b/memcheck/tests/fprw.stderr.exp-freebsd new file mode 100644 index 0000000000..1efbdcd91e --- /dev/null +++ b/memcheck/tests/fprw.stderr.exp-freebsd @@ -0,0 +1,35 @@ +Invalid read of size 8 + at 0x........: main (fprw.c:20) + Address 0x........ is 0 bytes inside a block of size 8 free'd + at 0x........: free (vg_replace_malloc.c:...) + by 0x........: main (fprw.c:18) + +Invalid write of size 8 + at 0x........: main (fprw.c:20) + Address 0x........ is 0 bytes inside a block of size 8 free'd + at 0x........: free (vg_replace_malloc.c:...) + by 0x........: main (fprw.c:18) + +Invalid read of size 4 + at 0x........: main (fprw.c:21) + Address 0x........ is 0 bytes inside a block of size 4 free'd + at 0x........: free (vg_replace_malloc.c:...) + by 0x........: main (fprw.c:19) + +Invalid write of size 4 + at 0x........: main (fprw.c:21) + Address 0x........ is 0 bytes inside a block of size 4 free'd + at 0x........: free (vg_replace_malloc.c:...) + by 0x........: main (fprw.c:19) + +Invalid free() / delete / delete[] / realloc() + at 0x........: free (vg_replace_malloc.c:...) + by 0x........: main (fprw.c:22) + Address 0x........ is not stack'd, malloc'd or (recently) free'd + +Invalid write of size 8 + at 0x........: main (fprw.c:24) + Address 0x........ is 0 bytes inside a block of size 4 alloc'd + at 0x........: malloc (vg_replace_malloc.c:...) + by 0x........: main (fprw.c:23) + diff --git a/memcheck/tests/fprw.stderr.exp-freebsd-x86 b/memcheck/tests/fprw.stderr.exp-freebsd-x86 new file mode 100644 index 0000000000..3b920e5922 --- /dev/null +++ b/memcheck/tests/fprw.stderr.exp-freebsd-x86 @@ -0,0 +1,41 @@ +Use of uninitialised value of size 4 + at 0x........: main (fprw.c:16) + +Use of uninitialised value of size 4 + at 0x........: main (fprw.c:17) + +Invalid read of size 8 + at 0x........: main (fprw.c:20) + Address 0x........ is 0 bytes inside a block of size 8 free'd + at 0x........: free (vg_replace_malloc.c:...) + by 0x........: main (fprw.c:18) + +Invalid write of size 8 + at 0x........: main (fprw.c:20) + Address 0x........ is 0 bytes inside a block of size 8 free'd + at 0x........: free (vg_replace_malloc.c:...) + by 0x........: main (fprw.c:18) + +Invalid read of size 4 + at 0x........: main (fprw.c:21) + Address 0x........ is 0 bytes inside a block of size 4 free'd + at 0x........: free (vg_replace_malloc.c:...) + by 0x........: main (fprw.c:19) + +Invalid write of size 4 + at 0x........: main (fprw.c:21) + Address 0x........ is 0 bytes inside a block of size 4 free'd + at 0x........: free (vg_replace_malloc.c:...) + by 0x........: main (fprw.c:19) + +Invalid free() / delete / delete[] / realloc() + at 0x........: free (vg_replace_malloc.c:...) + by 0x........: main (fprw.c:22) + Address 0x........ is not stack'd, malloc'd or (recently) free'd + +Invalid write of size 8 + at 0x........: main (fprw.c:24) + Address 0x........ is 0 bytes inside a block of size 4 alloc'd + at 0x........: malloc (vg_replace_malloc.c:...) + by 0x........: main (fprw.c:23) + diff --git a/memcheck/tests/freebsd/Makefile.am b/memcheck/tests/freebsd/Makefile.am new file mode 100644 index 0000000000..c1d675a7a3 --- /dev/null +++ b/memcheck/tests/freebsd/Makefile.am @@ -0,0 +1,93 @@ + +include $(top_srcdir)/Makefile.tool-tests.am + +dist_noinst_SCRIPTS = filter_stderr filter_pts dump_stdout filter_sigwait \ + filter_scalar + +EXTRA_DIST = \ + scalar.h \ + statfs.vgtest \ + statfs.stderr.exp \ + pdfork_pdkill.vgtest \ + pdfork_pdkill.stderr.exp \ + getfsstat.vgtest \ + getfsstat.stderr.exp \ + getfsstat.supp \ + getfsstat.stderr.exp-x86 \ + supponlyobj.vgtest \ + supponlyobj.stderr.exp \ + supponlyobj.supp \ + extattr.vgtest \ + extattr.stderr.exp \ + sigwait.vgtest \ + sigwait.stdout.exp \ + sigwait.stderr.exp \ + sigwait.stderr.exp-x86 \ + chflags.vgtest\ + chflags.stderr.exp \ + chflags.stderr.exp-x86 \ + get_set_login.vgtest \ + get_set_login.stderr.exp \ + revoke.vgtest \ + revoke.stderr.exp \ + scalar.vgtest \ + scalar.stderr.exp \ + scalar.stderr.exp-x86 \ + scalar.stderr.exp-freebsd130 \ + capsicum.vgtest \ + capsicum.stderr.exp \ + getfh.vgtest \ + getfh.stderr.exp \ + linkat.vgtest \ + linkat.stderr.exp \ + scalar_fork.vgtest \ + scalar_fork.stderr.exp \ + scalar_thr_exit.vgtest \ + scalar_thr_exit.stderr.exp \ + scalar_abort2.vgtest \ + scalar_abort2.stderr.exp \ + scalar_pdfork.vgtest \ + scalar_pdfork.stderr.exp \ + scalar_vfork.vgtest \ + scalar_vfork.stderr.exp \ + stat.vgtest \ + stat.stderr.exp \ + stat.stderr.exp-x86 \ + file_locking_wait6.vgtest \ + file_locking_wait6.stderr.exp \ + utimens.vgtest \ + utimens.stderr.exp \ + access.vgtest \ + access.stderr.exp \ + chmod_chown.vgtest \ + chmod_chown.stderr.exp \ + misc.vgtest \ + misc.stderr.exp \ + get_set_context.vgtest \ + get_set_context.stderr.exp \ + get_set_context.stderr.exp-x86 \ + utimes.vgtest \ + utimes.stderr.exp-x86 \ + utimes.stderr.exp \ + static_allocs.vgtest \ + static_allocs.stderr.exp + +check_PROGRAMS = \ + statfs pdfork_pdkill getfsstat inlinfo inlinfo_nested.so extattr \ + sigwait chflags get_set_login revoke scalar capsicum getfh \ + linkat scalar_fork scalar_thr_exit scalar_abort2 scalar_pdfork \ + scalar_vfork stat file_locking_wait6 utimens access chmod_chown \ + misc get_set_context utimes static_allocs + +AM_CFLAGS += $(AM_FLAG_M3264_PRI) +AM_CXXFLAGS += $(AM_FLAG_M3264_PRI) + +inlinfo_SOURCES = inlinfo.c +inlinfo_DEPENDENCIES = inlinfo_nested.so +inlinfo_LDFLAGS = -Wl,-rpath,$(top_builddir)/memcheck/tests/freebsd +inlinfo_LDADD = inlinfo_nested.so +inlinfo_nested_so_SOURCES = inlinfo_nested.c +inlinfo_nested_so_CFLAGS = $(AM_CFLAGS) -fPIC @FLAG_W_NO_UNINITIALIZED@ +inlinfo_nested_so_LDFLAGS = -Wl,-rpath,$(top_builddir)/memcheck/tests/freebsd -shared -fPIC + +scalar_CFLAGS = ${AM_CFLAGS} -g diff --git a/memcheck/tests/freebsd/access.c b/memcheck/tests/freebsd/access.c new file mode 100644 index 0000000000..69e5a36da5 --- /dev/null +++ b/memcheck/tests/freebsd/access.c @@ -0,0 +1,43 @@ +/* + * Tests for various access functions + * + * access + * eaccess + * accessat + */ + + +#include <unistd.h> +#include <stdio.h> +#include <fcntl.h> +#include <string.h> +#include <stdlib.h> + +int main() +{ + if (-1 == access("access.c", R_OK)) + { + perror("access failed:"); + } + + if (-1 == eaccess("access.c", F_OK)) + { + perror("eaccess failed:"); + } + + if (-1 == faccessat(AT_FDCWD, "access.c", R_OK, AT_EACCESS)) + { + perror("accessat failed:"); + } + + // error section + int badint; + char* badstring = strdup("foo"); + free(badstring); + access(badstring, badint); + eaccess(badstring, badint); + faccessat(badint, badstring, badint, badint); + + exit(badint); +} + diff --git a/memcheck/tests/freebsd/access.stderr.exp b/memcheck/tests/freebsd/access.stderr.exp new file mode 100644 index 0000000000..89166dcc31 --- /dev/null +++ b/memcheck/tests/freebsd/access.stderr.exp @@ -0,0 +1,53 @@ +Syscall param access(mode) contains uninitialised byte(s) + at 0x........: access (in /...libc...) + by 0x........: main (access.c:37) + +Syscall param access(pathname) points to unaddressable byte(s) + at 0x........: access (in /...libc...) + by 0x........: main (access.c:37) + Address 0x........ is 0 bytes inside a block of size 4 free'd + at 0x........: free (vg_replace_malloc.c:...) + by 0x........: main (access.c:36) + Block was alloc'd at + at 0x........: malloc (vg_replace_malloc.c:...) + ... + by 0x........: main (access.c:35) + +Syscall param eaccess(mode) contains uninitialised byte(s) + at 0x........: eaccess (in /...libc...) + by 0x........: main (access.c:38) + +Syscall param eaccess(path) points to unaddressable byte(s) + at 0x........: eaccess (in /...libc...) + by 0x........: main (access.c:38) + Address 0x........ is 0 bytes inside a block of size 4 free'd + at 0x........: free (vg_replace_malloc.c:...) + by 0x........: main (access.c:36) + Block was alloc'd at + at 0x........: malloc (vg_replace_malloc.c:...) + ... + by 0x........: main (access.c:35) + +Syscall param faccessat(fd) contains uninitialised byte(s) + at 0x........: faccessat (in /...libc...) + by 0x........: main (access.c:39) + +Syscall param faccessat(flag) contains uninitialised byte(s) + at 0x........: faccessat (in /...libc...) + by 0x........: main (access.c:39) + +Syscall param faccessat(path) points to unaddressable byte(s) + at 0x........: faccessat (in /...libc...) + by 0x........: main (access.c:39) + Address 0x........ is 0 bytes inside a block of size 4 free'd + at 0x........: free (vg_replace_malloc.c:...) + by 0x........: main (access.c:36) + Block was alloc'd at + at 0x........: malloc (vg_replace_malloc.c:...) + ... + by 0x........: main (access.c:35) + +Syscall param exit(status) contains uninitialised byte(s) + ... + by 0x........: main (access.c:41) + diff --git a/memcheck/tests/freebsd/access.vgtest b/memcheck/tests/freebsd/access.vgtest new file mode 100644 index 0000000000..28b90a030f --- /dev/null +++ b/memcheck/tests/freebsd/access.vgtest @@ -0,0 +1,3 @@ +prereq: test -e ./access +prog: access +vgopts: -q diff --git a/memcheck/tests/freebsd/capsicum.c b/memcheck/tests/freebsd/capsicum.c new file mode 100644 index 0000000000..c9cba9b588 --- /dev/null +++ b/memcheck/tests/freebsd/capsicum.c @@ -0,0 +1,97 @@ +#include <sys/capsicum.h> +#include <assert.h> +#include <stdio.h> +#include <stdlib.h> +#include <string.h> +#include <errno.h> +#include <unistd.h> +#include <err.h> +#include <sys/ioccom.h> +#include <net/bpf.h> + +int main(void) +{ + u_int mode; + if (-1 == cap_getmode(&mode)) { + perror("cap_getmode() failed:"); + exit(1); + } else { + assert(mode == 0U); + } + + // example from man cap_rights_get + cap_rights_t setrights, getrights; + int fd; + + memset(&setrights, 0, sizeof(setrights)); + memset(&getrights, 0, sizeof(getrights)); + + fd = open("capsicum.c", O_RDONLY); + if (fd < 0) + err(1, "open() failed"); + + cap_rights_init(&setrights, CAP_IOCTL, CAP_FSTAT, CAP_READ); + if (cap_rights_limit(fd, &setrights) < 0 && errno != ENOSYS) + err(1, "cap_rights_limit() failed"); + + unsigned long cmds[] = { BIOCGSTATS, BIOCROTZBUF }; + if (cap_ioctls_limit(fd, cmds, sizeof(cmds) / sizeof(cmds[0])) < 0 && errno != ENOSYS) { + err(1, "cap_ioctls_limit() filed"); + } + + uint32_t fcntlrights = CAP_FCNTL_GETFL | CAP_FCNTL_SETFL; + if (cap_fcntls_limit(STDIN_FILENO, fcntlrights) < 0 && errno != ENOSYS) { + err(1, "cap_fcnls_limit() filed"); + } + + if (cap_rights_get(fd, &getrights) < 0 && errno != ENOSYS) + err(1, "cap_rights_get() failed"); + + assert(memcmp(&setrights, &getrights, sizeof(setrights)) == 0); + + unsigned long getcmds[2]; + if (cap_ioctls_get(fd, getcmds, 2) < 0 && errno != ENOSYS) + err(1, "cap_ioctls_get() failed"); + + assert(memcmp(cmds, getcmds, sizeof(cmds)) == 0); + + uint32_t getfcntlrights; + if (cap_fcntls_get(STDIN_FILENO, &getfcntlrights) < 0 && errno != ENOSYS) { + err(1, "cap_fcnls_limit() filed"); + } + + assert(fcntlrights == getfcntlrights); + + //close(fd); + + cap_enter(); + + if (-1 == cap_getmode(&mode)) { + perror("cap_getmode() failed:"); + exit(1); + } else { + assert(mode != 0U); + } + + // error section + + int *px = malloc(sizeof(int)); + int x = px[0]; + + cap_getmode(NULL); + + cap_rights_get(0, NULL); + cap_rights_get(x, &getrights); + cap_rights_t* badrights = malloc(sizeof(cap_rights_t)); + cap_rights_init(badrights, CAP_FSTAT, CAP_READ); + free(badrights); + cap_rights_get(0, badrights); + + cap_rights_limit(x, &setrights); + + cap_rights_limit(fd, badrights); + + int fd2 = open("foo", O_RDWR); + if (fd2 >= 0) + err(1, "open in write mode should have failed"); +} diff --git a/memcheck/tests/freebsd/capsicum.stderr.exp b/memcheck/tests/freebsd/capsicum.stderr.exp new file mode 100644 index 0000000000..3d70dbf821 --- /dev/null +++ b/memcheck/tests/freebsd/capsicum.stderr.exp @@ -0,0 +1,41 @@ +WARNING: Valgrind may not operate correctly in capability mode. + Please consider disabling capability by using the RUNNING_ON_VALGRIND mechanism. + See http://valgrind.org/docs/manual/manual-core-adv.html#manual-core-adv.clientreq +Syscall param cap_getmode(modep) points to unaddressable byte(s) + ... + by 0x........: main (capsicum.c:81) + Address 0x........ is not stack'd, malloc'd or (recently) free'd + +Syscall param cap_rights_get(rights) points to unaddressable byte(s) + ... + by 0x........: main (capsicum.c:83) + Address 0x........ is not stack'd, malloc'd or (recently) free'd + +Syscall param cap_rights_get(fd) contains uninitialised byte(s) + ... + by 0x........: main (capsicum.c:84) + +Syscall param cap_rights_get(rights) points to unaddressable byte(s) + ... + by 0x........: main (capsicum.c:88) + Address 0x........ is 0 bytes inside a block of size 16 free'd + at 0x........: free (vg_replace_malloc.c:...) + by 0x........: main (capsicum.c:87) + Block was alloc'd at + at 0x........: malloc (vg_replace_malloc.c:...) + by 0x........: main (capsicum.c:85) + +Syscall param cap_rights_limit(fd) contains uninitialised byte(s) + ... + by 0x........: main (capsicum.c:90) + +Syscall param cap_rights_limit(rights) points to unaddressable byte(s) + ... + by 0x........: main (capsicum.c:92) + Address 0x........ is 0 bytes inside a block of size 16 free'd + at 0x........: free (vg_replace_malloc.c:...) + by 0x........: main (capsicum.c:87) + Block was alloc'd at + at 0x........: malloc (vg_replace_malloc.c:...) + by 0x........: main (capsicum.c:85) + diff --git a/memcheck/tests/freebsd/capsicum.vgtest b/memcheck/tests/freebsd/capsicum.vgtest new file mode 100644 index 0000000000..f6ec3e12e7 --- /dev/null +++ b/memcheck/tests/freebsd/capsicum.vgtest @@ -0,0 +1,3 @@ +prereq: test -e ./capsicum +prog: capsicum +vgopts: -q diff --git a/memcheck/tests/freebsd/chflags.c b/memcheck/tests/freebsd/chflags.c new file mode 100644 index 0000000000..b32a44b4f4 --- /dev/null +++ b/memcheck/tests/freebsd/chflags.c @@ -0,0 +1,43 @@ +#include <sys/stat.h> +#include <unistd.h> +#include <fcntl.h> +#include <string.h> +#include <stdlib.h> +#include "../../memcheck.h" + + +int main() +{ + const char* filename = strdup("chflags.tst"); + int fd = open(filename, O_RDWR | O_CREAT, S_IRUSR | S_IWUSR); + + fchflags(fd, UF_APPEND); + + // a couple of errors while the file is open + int badfd = fd; + unsigned long badflags = UF_NODUMP; + VALGRIND_MAKE_MEM_UNDEFINED(&badfd, sizeof(int)); + VALGRIND_MAKE_MEM_UNDEFINED(&badflags, sizeof(unsigned long)); + + fchflags(badfd, UF_REPARSE); + fchflags(fd, badflags); + close(fd); + + chflags(filename, UF_SYSTEM); + lchflags(filename, UF_SYSTEM); + chflagsat(AT_FDCWD, filename, UF_SYSTEM, 0); + + chflags(filename, badflags); + lchflags(filename, badflags); + chflagsat(AT_FDCWD, filename, badflags, 0); + + int badatflag; + chflagsat(AT_FDCWD, filename, UF_SYSTEM, badatflag); + + free((void*)filename); + + chflags(filename, UF_SYSTEM); + lchflags(filename, UF_SYSTEM); + chflagsat(AT_FDCWD, filename, UF_SYSTEM, 0); +} + diff --git a/memcheck/tests/freebsd/chflags.stderr.exp b/memcheck/tests/freebsd/chflags.stderr.exp new file mode 100644 index 0000000000..82c11d13b2 --- /dev/null +++ b/memcheck/tests/freebsd/chflags.stderr.exp @@ -0,0 +1,57 @@ +Syscall param fchflags(fd) contains uninitialised byte(s) + at 0x........: fchflags (in /...libc...) + by 0x........: main (chflags.c:22) + +Syscall param fchflags(flags) contains uninitialised byte(s) + at 0x........: fchflags (in /...libc...) + by 0x........: main (chflags.c:23) + +Syscall param chflags(flags) contains uninitialised byte(s) + at 0x........: chflags (in /...libc...) + by 0x........: main (chflags.c:30) + +Syscall param lchflags(flags) contains uninitialised byte(s) + at 0x........: lchflags (in /...libc...) + by 0x........: main (chflags.c:31) + +Syscall param chflagsat(flags) contains uninitialised byte(s) + at 0x........: chflagsat (in /...libc...) + by 0x........: main (chflags.c:32) + +Syscall param chflagsat(atflag) contains uninitialised byte(s) + at 0x........: chflagsat (in /...libc...) + by 0x........: main (chflags.c:35) + +Syscall param chflags(path) points to unaddressable byte(s) + at 0x........: chflags (in /...libc...) + by 0x........: main (chflags.c:39) + Address 0x........ is 0 bytes inside a block of size 12 free'd + at 0x........: free (vg_replace_malloc.c:...) + by 0x........: main (chflags.c:37) + Block was alloc'd at + at 0x........: malloc (vg_replace_malloc.c:...) + ... + by 0x........: main (chflags.c:11) + +Syscall param lchflags(path) points to unaddressable byte(s) + at 0x........: lchflags (in /...libc...) + by 0x........: main (chflags.c:40) + Address 0x........ is 0 bytes inside a block of size 12 free'd + at 0x........: free (vg_replace_malloc.c:...) + by 0x........: main (chflags.c:37) + Block was alloc'd at + at 0x........: malloc (vg_replace_malloc.c:...) + ... + by 0x........: main (chflags.c:11) + +Syscall param chflagsat(path) points to unaddressable byte(s) + at 0x........: chflagsat (in /...libc...) + by 0x........: main (chflags.c:41) + Address 0x........ is 0 bytes inside a block of size 12 free'd + at 0x........: free (vg_replace_malloc.c:...) + by 0x........: main (chflags.c:37) + Block was alloc'd at + at 0x........: malloc (vg_replace_malloc.c:...) + ... + by 0x........: main (chflags.c:11) + diff --git a/memcheck/tests/freebsd/chflags.stderr.exp-x86 b/memcheck/tests/freebsd/chflags.stderr.exp-x86 new file mode 100644 index 0000000000..61e0aae414 --- /dev/null +++ b/memcheck/tests/freebsd/chflags.stderr.exp-x86 @@ -0,0 +1,58 @@ +Invalid read of size 4 + at 0x........: main (chflags.c:23) + Address 0x........ is 0 bytes inside a block of size 4 free'd + at 0x........: free (vg_replace_malloc.c:...) + by 0x........: main (chflags.c:21) + Block was alloc'd at + at 0x........: malloc (vg_replace_malloc.c:...) + by 0x........: main (chflags.c:15) + +Invalid read of size 4 + at 0x........: main (chflags.c:27) + Address 0x........ is 0 bytes inside a block of size 4 free'd + at 0x........: free (vg_replace_malloc.c:...) + by 0x........: main (chflags.c:25) + Block was alloc'd at + at 0x........: malloc (vg_replace_malloc.c:...) + by 0x........: main (chflags.c:16) + +Invalid read of size 4 + at 0x........: main (chflags.c:34) + Address 0x........ is 0 bytes inside a block of size 4 free'd + at 0x........: free (vg_replace_malloc.c:...) + by 0x........: main (chflags.c:25) + Block was alloc'd at + at 0x........: malloc (vg_replace_malloc.c:...) + by 0x........: main (chflags.c:16) + +Invalid read of size 4 + at 0x........: main (chflags.c:35) + Address 0x........ is 0 bytes inside a block of size 4 free'd + at 0x........: free (vg_replace_malloc.c:...) + by 0x........: main (chflags.c:25) + Block was alloc'd at + at 0x........: malloc (vg_replace_malloc.c:...) + by 0x........: main (chflags.c:16) + +Syscall param chflags(path) points to unaddressable byte(s) + at 0x........: chflags (in /...libc...) + by 0x........: main (chflags.c:39) + Address 0x........ is 0 bytes inside a block of size 12 free'd + at 0x........: free (vg_replace_malloc.c:...) + by 0x........: main (chflags.c:37) + Block was alloc'd at + at 0x........: malloc (vg_replace_malloc.c:...) + ... + by 0x........: main (chflags.c:9) + +Syscall param chflags(path) points to unaddressable byte(s) + at 0x........: lchflags (in /...libc...) + by 0x........: main (chflags.c:40) + Address 0x........ is 0 bytes inside a block of size 12 free'd + at 0x........: free (vg_replace_malloc.c:...) + by 0x........: main (chflags.c:37) + Block was alloc'd at + at 0x........: malloc (vg_replace_malloc.c:...) + ... + by 0x........: main (chflags.c:9) + diff --git a/memcheck/tests/freebsd/chflags.vgtest b/memcheck/tests/freebsd/chflags.vgtest new file mode 100644 index 0000000000..f9fa4b4d0e --- /dev/null +++ b/memcheck/tests/freebsd/chflags.vgtest @@ -0,0 +1,4 @@ +prog: chflags +vgopts: -q +cleanup: rm -f chflags.tst + diff --git a/memcheck/tests/freebsd/chmod_chown.c b/memcheck/tests/freebsd/chmod_chown.c new file mode 100644 index 0000000000..1fe40f4145 --- /dev/null +++ b/memcheck/tests/freebsd/chmod_chown.c @@ -0,0 +1,65 @@ +/* + * Test this family of functions + * lchmod chownat lchownat + */ + +#include <unistd.h> +#include <dirent.h> +#include <string.h> +#include <stdio.h> +#include <stdlib.h> +#include <sys/stat.h> + +int main(void) +{ + char buff[64]; + char tmpfile[] = "/tmp/test_chmod_chown.XXXXXX"; + char tmplink[] = "/tmp/test_chx_link.XXXXXX"; + int tmpfd = mkstemp(tmpfile); + mktemp(tmplink); + + memset(buff, 0, sizeof(buff)); + sprintf(buff, "some data"); + write(tmpfd, buff, strlen(buff)+1); + close (tmpfd); + + DIR* tmpdir = opendir("/tmp"); + if (tmpdir) { + int tmpdirfd = dirfd(tmpdir); + + if (-1 == symlinkat(tmpfile+5, tmpdirfd, tmplink+5)) { + perror("linkat failed"); + } + + if (-1 == lchmod(tmplink, S_IRWXU|S_IRWXG|S_IRWXO)) + { + perror("lchmod failed:"); + } + + if (fchmodat(tmpdirfd, tmpfile+5, S_IRWXU|S_IRWXG|S_IRWXO, 0)) + { + perror("fchmodat failed:"); + } + + // no test for failure as not everyone runnning this will be a member of group 921 + fchownat(tmpdirfd, tmpfile+5, getuid(), 920, 0); + + closedir(tmpdir); + } + + unlink(tmpfile); + unlink(tmplink); + + // error section + char* badstring = strdup("foo"); + free(badstring); + int badint1; + int badint2; + int badint3; + int badint4; + + lchmod(badstring, badint1); + fchmodat(badint1, badstring, badint2, badint3); + fchownat(badint1, badstring, badint2, badint3, badint4); +} + diff --git a/memcheck/tests/freebsd/chmod_chown.stderr.exp b/memcheck/tests/freebsd/chmod_chown.stderr.exp new file mode 100644 index 0000000000..87a76a1252 --- /dev/null +++ b/memcheck/tests/freebsd/chmod_chown.stderr.exp @@ -0,0 +1,65 @@ +Syscall param lchmod(mode) contains uninitialised byte(s) + ... + by 0x........: main (chmod_chown.c:61) + +Syscall param lchmod(path) points to unaddressable byte(s) + ... + by 0x........: main (chmod_chown.c:61) + Address 0x........ is 0 bytes inside a block of size 4 free'd + at 0x........: free (vg_replace_malloc.c:...) + by 0x........: main (chmod_chown.c:55) + Block was alloc'd at + at 0x........: malloc (vg_replace_malloc.c:...) + ... + by 0x........: main (chmod_chown.c:54) + +Syscall param fchmodat(fd) contains uninitialised byte(s) + ... + by 0x........: main (chmod_chown.c:62) + +Syscall param fchmodat(mode) contains uninitialised byte(s) + ... + by 0x........: main (chmod_chown.c:62) + +Syscall param fchmodat(flag) contains uninitialised byte(s) + ... + by 0x........: main (chmod_chown.c:62) + +Syscall param fchmodat(path) points to unaddressable byte(s) + ... + by 0x........: main (chmod_chown.c:62) + Address 0x........ is 0 bytes inside a block of size 4 free'd + at 0x........: free (vg_replace_malloc.c:...) + by 0x........: main (chmod_chown.c:55) + Block was alloc'd at + at 0x........: malloc (vg_replace_malloc.c:...) + ... + by 0x........: main (chmod_chown.c:54) + +Syscall param fchownat(fd) contains uninitialised byte(s) + ... + by 0x........: main (chmod_chown.c:63) + +Syscall param fchownat(owner) contains uninitialised byte(s) + ... + by 0x........: main (chmod_chown.c:63) + +Syscall param fchownat(group) contains uninitialised byte(s) + ... + by 0x........: main (chmod_chown.c:63) + +Syscall param fchownat(flag) contains uninitialised byte(s) + ... + by 0x........: main (chmod_chown.c:63) + +Syscall param fchownat(path) points to unaddressable byte(s) + ... + by 0x........: main (chmod_chown.c:63) + Address 0x........ is 0 bytes inside a block of size 4 free'd + at 0x........: free (vg_replace_malloc.c:...) + by 0x........: main (chmod_chown.c:55) + Block was alloc'd at + at 0x........: malloc (vg_replace_malloc.c:...) + ... + by 0x........: main (chmod_chown.c:54) + diff --git a/memcheck/tests/freebsd/chmod_chown.vgtest b/memcheck/tests/freebsd/chmod_chown.vgtest new file mode 100644 index 0000000000..db60bb886f --- /dev/null +++ b/memcheck/tests/freebsd/chmod_chown.vgtest @@ -0,0 +1,3 @@ +prereq: test -e ./chmod_chown +prog: chmod_chown +vgopts: -q diff --git a/memcheck/tests/freebsd/dump_stdout b/memcheck/tests/freebsd/dump_stdout new file mode 100755 index 0000000000..a8b7c3e935 --- /dev/null +++ b/memcheck/... [truncated message content] |
|
From: Paul F. <pa...@so...> - 2021-10-09 10:52:49
|
https://sourceware.org/git/gitweb.cgi?p=valgrind.git;h=1bbd829adb5a192593543d7b0fc2fab154317ece commit 1bbd829adb5a192593543d7b0fc2fab154317ece Author: Paul Floyd <pj...@wa...> Date: Sat Oct 9 12:51:41 2021 +0200 FreeBSD support, patch 10 Missing new expected file Diff: --- memcheck/tests/dw4.stderr.exp-freebsd | 49 +++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) diff --git a/memcheck/tests/dw4.stderr.exp-freebsd b/memcheck/tests/dw4.stderr.exp-freebsd new file mode 100644 index 0000000000..e396a43b8a --- /dev/null +++ b/memcheck/tests/dw4.stderr.exp-freebsd @@ -0,0 +1,49 @@ +Uninitialised byte(s) found during client check request + at 0x........: croak (dw4.c:32) + by 0x........: main (dw4.c:59) + Address 0x........ is 4 bytes inside a block of size ... alloc'd + at 0x........: malloc (vg_replace_malloc.c:...) + by 0x........: main (dw4.c:52) + +Uninitialised byte(s) found during client check request + at 0x........: croak (dw4.c:32) + by 0x........: main (dw4.c:61) + Location 0x........ is 0 bytes inside S2[0].i, + a global variable declared at dw4.c:47 + +Uninitialised byte(s) found during client check request + at 0x........: croak (dw4.c:32) + by 0x........: main (dw4.c:62) + Location 0x........ is 0 bytes inside local.i, + declared at dw4.c:51, in frame #1 of thread 1 + +Uninitialised byte(s) found during client check request + at 0x........: croak (dw4.c:32) + by 0x........: main (dw4.c:68) + Address 0x........ is in a rw- anonymous segment + +Uninitialised byte(s) found during client check request + at 0x........: croak (dw4.c:32) + by 0x........: main (dw4.c:82) + Address 0x........ is in a rw- mapped file valgrind-dw4-test.PID segment + +Uninitialised byte(s) found during client check request + at 0x........: croak (dw4.c:32) + by 0x........: main (dw4.c:87) + Address 0x........ is 0 bytes after the brk data segment limit 0x........ + +Uninitialised byte(s) found during client check request + at 0x........: croak (dw4.c:32) + by 0x........: main (dw4.c:89) + Address 0x........ is in the brk data segment 0x........-0x........ + +Uninitialised byte(s) found during client check request + at 0x........: croak (dw4.c:32) + by 0x........: main (dw4.c:91) + Address 0x........ is in the brk data segment 0x........-0x........ + +Unaddressable byte(s) found during client check request + at 0x........: croak (dw4.c:25) + by 0x........: main (dw4.c:93) + Address 0x........ is 1024 bytes after the brk data segment limit 0x........ + |