Index: head/devel/valgrind-devel/Makefile =================================================================== --- head/devel/valgrind-devel/Makefile (revision 409635) +++ head/devel/valgrind-devel/Makefile (revision 409636) @@ -1,88 +1,94 @@ # Created by: Simon Barner # $FreeBSD$ PORTNAME= valgrind -PORTVERSION= 3.10.0.20150126 +PORTVERSION= 3.10.1.20160113 DISTVERSIONPREFIX= freebsd- -PORTREVISION= 2 +PORTREVISION= 0 PORTEPOCH= 1 CATEGORIES= devel MASTER_SITES= https://bitbucket.org/${BB_ACCOUNT}/${BB_PROJECT}/get/${BB_COMMIT}.tar.gz?dummy=/ \ http://mirror.shatow.net/freebsd/${PORTNAME}/ PKGNAMESUFFIX= -devel MAINTAINER= bdrewery@FreeBSD.org COMMENT= Memory debugging and profiling tool -BB_COMMIT= 963c4a777573 +BB_COMMIT= ce1acb28953f BB_ACCOUNT= stass BB_PROJECT= valgrind-freebsd LICENSE= GPLv2 CONFLICTS= valgrind-[0-9]* ONLY_FOR_ARCHS= i386 amd64 LIB32_PATH?= ${DESTDIR}/usr/lib32/libc.so BUILD_DEPENDS+= docbook-xsl>=0:${PORTSDIR}/textproc/docbook-xsl \ xsltproc:${PORTSDIR}/textproc/libxslt OPTIONS_DEFINE= MPI DOCS OPTIONS_DEFINE_amd64= 32BIT .if exists(${LIB32_PATH}) OPTIONS_DEFAULT_amd64= 32BIT .endif 32BIT_DESC= Enable debugging of 32-bit programs (requires lib32) MPI_DESC= Enable build of MPI wrappers MPI_LIB_DEPENDS= libmpich.so:${PORTSDIR}/net/mpich2 OPTIONS_SUB= yes USES= pathfix pkgconfig gmake perl5 shebangfix autoreconf PATHFIX_MAKEFILEIN= Makefile.am USE_PERL5= build GNU_CONFIGURE= yes USE_LDCONFIG= yes SHEBANG_FILES= callgrind/callgrind_annotate.in callgrind/callgrind_control.in + +EXTRA_PATCHES= \ + ${FILESDIR}/accept4_syscall.patch:-p1 \ + ${FILESDIR}/jail_syscalls.patch:-p1 \ + ${FILESDIR}/kldload_syscalls.patch:-p1 \ + ${FILESDIR}/missing_fcntls.patch:-p1 PORTDOCS= html WRKSRC= ${WRKDIR}/${BB_ACCOUNT}-${BB_PROJECT}-${BB_COMMIT} CONFIGURE_ENV+= ac_cv_path_PERL=${PERL} USE_GCC= yes .include .if ${ARCH} == "amd64" PLIST_SUB+= AMD64="" ARCH=amd64 . if !${PORT_OPTIONS:M32BIT} CONFIGURE_ARGS+= --enable-only64bit PLIST_SUB+= X86="@comment " . else . if !exists(${LIB32_PATH}) IGNORE=The lib32 distribution was not found. Please install the lib32\ distribution or run 'make config' and uncheck 32BIT option . endif PLIST_SUB+= X86="" . endif .else PLIST_SUB+= X86="" ARCH=x86 PLIST_SUB+= AMD64="@comment " .endif .if !${PORT_OPTIONS:MDOCS} post-patch: @${RM} -rf ${WRKSRC}/docs/html .endif post-build: cd ${WRKSRC}/docs && ${SETENV} ${MAKE_ENV} ${MAKE_CMD} man-pages .if ${PORT_OPTIONS:MDOCS} cd ${WRKSRC}/docs && ${SETENV} ${MAKE_ENV} ${MAKE_CMD} html-docs .endif .include Index: head/devel/valgrind-devel/distinfo =================================================================== --- head/devel/valgrind-devel/distinfo (revision 409635) +++ head/devel/valgrind-devel/distinfo (revision 409636) @@ -1,2 +1,2 @@ -SHA256 (valgrind-freebsd-3.10.0.20150126.tar.gz) = 22086b8d36056dbcf0f95b4737e03a206058e4fa97e097a34f4275ded6849103 -SIZE (valgrind-freebsd-3.10.0.20150126.tar.gz) = 12185205 +SHA256 (valgrind-freebsd-3.10.1.20160113.tar.gz) = b580fcacf06befce33a4ba4badaa346b5e57c25774f62af38488dec6ad01eb8c +SIZE (valgrind-freebsd-3.10.1.20160113.tar.gz) = 12084614 Index: head/devel/valgrind-devel/files/accept4_syscall.patch =================================================================== --- head/devel/valgrind-devel/files/accept4_syscall.patch (nonexistent) +++ head/devel/valgrind-devel/files/accept4_syscall.patch (revision 409636) @@ -0,0 +1,56 @@ +# HG changeset patch +# User Bitbucket +# Date 0 0 +# Node ID af5523fe25247f537884116bd37e8ce171ba837e +# Parent ce1acb28953fd6928ccb8f9511e374eab66e8625 +# Parent 22cf2727f838e9f5efaeba377341c3807d74dbdb +Merge preview of source (22cf2727f838e9f5efaeba377341c3807d74dbdb) to destination (ce1acb28953fd6928ccb8f9511e374eab66e8625). + +diff -r ce1acb28953fd6928ccb8f9511e374eab66e8625 -r af5523fe25247f537884116bd37e8ce171ba837e coregrind/m_syswrap/syswrap-freebsd.c +--- a/coregrind/m_syswrap/syswrap-freebsd.c ++++ b/coregrind/m_syswrap/syswrap-freebsd.c +@@ -480,6 +480,23 @@ + SET_STATUS_from_SysRes(r); + } + ++PRE(sys_accept4) ++{ ++ *flags |= SfMayBlock; ++ PRINT("sys_accept4 ( %ld, %#lx, %ld, %ld)",ARG1,ARG2,ARG3,ARG4); ++ PRE_REG_READ4(long, "accept4", ++ int, s, struct sockaddr *, addr, int, *addrlen, int, flags); ++ ML_(generic_PRE_sys_accept)(tid, ARG1,ARG2,ARG3); ++} ++POST(sys_accept4) ++{ ++ SysRes r; ++ vg_assert(SUCCESS); ++ r = ML_(generic_POST_sys_accept)(tid, VG_(mk_SysRes_Success)(RES), ++ ARG1,ARG2,ARG3); ++ SET_STATUS_from_SysRes(r); ++} ++ + PRE(sys_sendto) + { + *flags |= SfMayBlock; +@@ -4307,7 +4324,8 @@ + + BSDXY(__NR___semctl, sys___semctl), // 510 + BSDXY(__NR_shmctl, sys_shmctl), // 512 +- ++ ++ BSDXY(__NR_accept4, sys_accept4), //541 + BSDXY(__NR_pipe2, sys_pipe2), // 542 + + BSDX_(__NR_fake_sigreturn, sys_fake_sigreturn), // 1000, fake sigreturn +diff -r ce1acb28953fd6928ccb8f9511e374eab66e8625 -r af5523fe25247f537884116bd37e8ce171ba837e include/vki/vki-scnums-freebsd.h +--- a/include/vki/vki-scnums-freebsd.h ++++ b/include/vki/vki-scnums-freebsd.h +@@ -407,6 +407,7 @@ + #define __NR_posix_openpt 504 + #define __NR___semctl 510 + #define __NR_shmctl 512 ++#define __NR_accept4 541 + #define __NR_pipe2 542 + + #define __NR_fake_sigreturn 1000 Property changes on: head/devel/valgrind-devel/files/accept4_syscall.patch ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +1 \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/devel/valgrind-devel/files/jail_syscalls.patch =================================================================== --- head/devel/valgrind-devel/files/jail_syscalls.patch (nonexistent) +++ head/devel/valgrind-devel/files/jail_syscalls.patch (revision 409636) @@ -0,0 +1,87 @@ +# HG changeset patch +# User Bitbucket +# Date 0 0 +# Node ID 90c6097540f35e312d34340b916296130003c851 +# Parent ce1acb28953fd6928ccb8f9511e374eab66e8625 +# Parent 5662e704b72c7ebb116f8478a4ff3847acc72fc6 +Merge preview of source (5662e704b72c7ebb116f8478a4ff3847acc72fc6) to destination (ce1acb28953fd6928ccb8f9511e374eab66e8625). + +diff -r ce1acb28953fd6928ccb8f9511e374eab66e8625 -r 90c6097540f35e312d34340b916296130003c851 coregrind/m_syswrap/syswrap-freebsd.c +--- a/coregrind/m_syswrap/syswrap-freebsd.c ++++ b/coregrind/m_syswrap/syswrap-freebsd.c +@@ -3670,6 +3670,42 @@ + POST_MEM_WRITE( ARG5, ARG4 ); + } + ++PRE(sys_jail_get) ++{ ++ ++ PRINT("sys_jail_get ( %#lx, %lu, %ld )", ARG1, ARG2, ARG3); ++ PRE_REG_READ3(int, "jail_get", struct vki_iovec *, iov, unsigned int, ++ niov, int, flags); ++ PRE_MEM_WRITE("jail_get", ARG1, ARG2 * sizeof(struct vki_iovec)); ++} ++ ++POST(sys_jail_get) ++{ ++ vg_assert(SUCCESS); ++ if (RES != -1) ++ POST_MEM_WRITE(ARG1, ARG2); ++} ++ ++PRE(sys_jail_set) ++{ ++ PRINT("sys_jail_set ( %#lx, %lu, %ld )", ARG1, ARG2, ARG3); ++ PRE_REG_READ3(int, "jail_set", struct vki_iovec *, iov, unsigned int, ++ niov, int, flags); ++ PRE_MEM_WRITE("jail_set", ARG1, ARG2 * sizeof(struct vki_iovec)); ++} ++ ++PRE(sys_jail_attach) ++{ ++ PRINT("sys_jail_attach ( %ld )", ARG1); ++ PRE_REG_READ1(int, "jail_attach", int, jid); ++} ++ ++PRE(sys_jail_remove) ++{ ++ PRINT("sys_jail_remove ( %ld )", ARG1); ++ PRE_REG_READ1(int, "jail_remove", int, jid); ++} ++ + #undef PRE + #undef POST + +@@ -4219,7 +4255,7 @@ + BSDXY(__NR__umtx_lock, sys__umtx_lock), // 434 + BSDXY(__NR__umtx_unlock, sys__umtx_unlock), // 435 + +- // jail_attach 436 ++ BSDX_(__NR_jail_attach, sys_jail_attach), // 436 + // extattr_list_fd 437 + // extattr_list_file 438 + // extattr_list_link 439 +@@ -4303,6 +4339,10 @@ + BSDX_(__NR_symlinkat, sys_symlinkat), // 502 + BSDX_(__NR_unlinkat, sys_unlinkat), // 503 + ++ BSDXY(__NR_jail_get, sys_jail_get), // 506 ++ BSDX_(__NR_jail_set, sys_jail_set), // 507 ++ BSDX_(__NR_jail_remove, sys_jail_remove), // 508 ++ + // posix_openpt 504 + + BSDXY(__NR___semctl, sys___semctl), // 510 +diff -r ce1acb28953fd6928ccb8f9511e374eab66e8625 -r 90c6097540f35e312d34340b916296130003c851 include/vki/vki-scnums-freebsd.h +--- a/include/vki/vki-scnums-freebsd.h ++++ b/include/vki/vki-scnums-freebsd.h +@@ -405,6 +405,9 @@ + #define __NR_symlinkat 502 + #define __NR_unlinkat 503 + #define __NR_posix_openpt 504 ++#define __NR_jail_get 506 ++#define __NR_jail_set 507 ++#define __NR_jail_remove 508 + #define __NR___semctl 510 + #define __NR_shmctl 512 + #define __NR_pipe2 542 Property changes on: head/devel/valgrind-devel/files/jail_syscalls.patch ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +1 \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/devel/valgrind-devel/files/kldload_syscalls.patch =================================================================== --- head/devel/valgrind-devel/files/kldload_syscalls.patch (nonexistent) +++ head/devel/valgrind-devel/files/kldload_syscalls.patch (revision 409636) @@ -0,0 +1,127 @@ +# HG changeset patch +# User Bitbucket +# Date 0 0 +# Node ID 7ecd33d57049211e1084fc5e8bf588da49088d75 +# Parent ce1acb28953fd6928ccb8f9511e374eab66e8625 +# Parent 79bf8f58bec842a1aa94f4fff2e4884a6bb5378b +Merge preview of source (79bf8f58bec842a1aa94f4fff2e4884a6bb5378b) to destination (ce1acb28953fd6928ccb8f9511e374eab66e8625). + +diff -r ce1acb28953fd6928ccb8f9511e374eab66e8625 -r 7ecd33d57049211e1084fc5e8bf588da49088d75 coregrind/m_syswrap/syswrap-freebsd.c +--- a/coregrind/m_syswrap/syswrap-freebsd.c ++++ b/coregrind/m_syswrap/syswrap-freebsd.c +@@ -1246,6 +1246,52 @@ + POST_MEM_WRITE( ARG2, sizeof(struct vki_statfs6) ); + } + ++/* --------------------------------------------------------------------- ++ kld* wrappers ++ ------------------------------------------------------------------ */ ++ ++PRE(sys_kldload) ++{ ++ PRINT("sys_kldload ( %#lx(%s) )", ARG1, (char *)ARG1); ++ PRE_REG_READ1(int, "kldload", const char *, "file"); ++ ++ PRE_MEM_RASCIIZ( "kldload(file)", ARG1 ); ++} ++ ++PRE(sys_kldunload) ++{ ++ PRINT("sys_kldunload ( %ld )", ARG1); ++ PRE_REG_READ1(int, "kldunload", int, "fileid"); ++} ++ ++PRE(sys_kldfind) ++{ ++ PRINT("sys_kldfind ( %#lx(%s) )", ARG1, (char *)ARG1); ++ PRE_REG_READ1(int, "kldfind", const char *, "file"); ++ ++ PRE_MEM_RASCIIZ( "kldfind(file)", ARG1 ); ++} ++ ++PRE(sys_kldnext) ++{ ++ PRINT("sys_kldnext ( %ld )", ARG1); ++ PRE_REG_READ1(int, "kldnext", int, "fileid"); ++} ++ ++PRE(sys_kldsym) ++{ ++ PRINT("sys_kldsym ( %ld, %ld, %#lx )", ARG1,ARG2,ARG3 ); ++ PRE_REG_READ3(int, "kldsym", int, "fileid", int, "command", void*, "data"); ++ PRE_MEM_READ( "kldsym(data)", ARG3, sizeof(struct vki_kld_sym_lookup) ); ++ struct vki_kld_sym_lookup *kslp = (struct vki_kld_sym_lookup *)ARG3; ++ PRE_MEM_RASCIIZ( "kldsym(data.symname)", (Addr)kslp->symname ); ++} ++POST(sys_kldsym) ++{ ++ struct vki_kld_sym_lookup *kslp = (struct vki_kld_sym_lookup *)ARG3; ++ POST_MEM_WRITE( (Addr)&kslp->symvalue, sizeof(kslp->symvalue) ); ++ POST_MEM_WRITE( (Addr)&kslp->symsize, sizeof(kslp->symsize) ); ++} + + #if 0 + /* --------------------------------------------------------------------- +@@ -3389,14 +3435,14 @@ + moans--; + VG_(message)(Vg_UserMsg, + "Warning: noted but unhandled ioctl 0x%lx" +- " with no size/direction hints", ++ " with no size/direction hints\n", + ARG2); + VG_(message)(Vg_UserMsg, + " This could cause spurious value errors" +- " to appear."); ++ " to appear.\n"); + VG_(message)(Vg_UserMsg, + " See README_MISSING_SYSCALL_OR_IOCTL for " +- "guidance on writing a proper wrapper." ); ++ "guidance on writing a proper wrapper.\n" ); + } + } else { + if ((dir & _VKI_IOC_WRITE) && size > 0) +@@ -4054,10 +4100,10 @@ + // BSDX_(__NR_modfnext, sys_modfnext), // 302 + BSDX_(__NR_modfind, sys_modfind), // 303 + +-// BSDX_(__NR_kldload, sys_kldload), // 304 +-// BSDX_(__NR_kldunload, sys_kldunload), // 305 +-// BSDX_(__NR_kldfind, sys_kldfind), // 306 +-// BSDX_(__NR_kldnext, sys_kldnext), // 307 ++ BSDX_(__NR_kldload, sys_kldload), // 304 ++ BSDX_(__NR_kldunload, sys_kldunload), // 305 ++ BSDX_(__NR_kldfind, sys_kldfind), // 306 ++ BSDX_(__NR_kldnext, sys_kldnext), // 307 + + // BSDXY(__NR_kldstat, sys_kldstat), // 308 + // BSDX_(__NR_kldfirstmod, sys_kldfirstmod), // 309 +@@ -4095,7 +4141,7 @@ + BSDX_(__NR_utrace, sys_utrace), // 335 + + // compat3 sendfile 336 +-// BSDXY(__NR_kldsym, sys_kldsym), // 337 ++ BSDXY(__NR_kldsym, sys_kldsym), // 337 + // BSDX_(__NR_jail, sys_jail), // 338 + // unimpl pioctl 339 + +diff -r ce1acb28953fd6928ccb8f9511e374eab66e8625 -r 7ecd33d57049211e1084fc5e8bf588da49088d75 include/vki/vki-freebsd.h +--- a/include/vki/vki-freebsd.h ++++ b/include/vki/vki-freebsd.h +@@ -2129,6 +2129,17 @@ + void *spare[3]; + }; + ++//---------------------------------------------------------------------- ++// From sys/linker.h ++//---------------------------------------------------------------------- ++ ++struct vki_kld_sym_lookup { ++ int version; /* set to sizeof(struct kld_sym_lookup) */ ++ char *symname; /* Symbol name we are looking up */ ++ unsigned long symvalue; ++ vki_size_t symsize; ++}; ++ + /*--------------------------------------------------------------------*/ + /*--- end ---*/ + /*--------------------------------------------------------------------*/ Property changes on: head/devel/valgrind-devel/files/kldload_syscalls.patch ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +1 \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/devel/valgrind-devel/files/missing_fcntls.patch =================================================================== --- head/devel/valgrind-devel/files/missing_fcntls.patch (nonexistent) +++ head/devel/valgrind-devel/files/missing_fcntls.patch (revision 409636) @@ -0,0 +1,54 @@ +diff --git a/coregrind/m_syswrap/syswrap-freebsd.c b/coregrind/m_syswrap/syswrap-freebsd.c +--- a/coregrind/m_syswrap/syswrap-freebsd.c ++++ b/coregrind/m_syswrap/syswrap-freebsd.c +@@ -3278,9 +3278,12 @@ PRE(sys_fcntl) + + // These ones use ARG3 as "arg". + case VKI_F_DUPFD: ++ case VKI_F_DUPFD_CLOEXEC: + case VKI_F_SETFD: + case VKI_F_SETFL: + case VKI_F_SETOWN: ++ case VKI_F_READAHEAD: ++ case VKI_F_RDAHEAD: + PRINT("sys_fcntl[ARG3=='arg'] ( %ld, %ld, %ld )", ARG1,ARG2,ARG3); + PRE_REG_READ3(long, "fcntl", + unsigned int, fd, unsigned int, cmd, unsigned long, arg); +@@ -3300,6 +3303,7 @@ PRE(sys_fcntl) + + // This one uses ARG3 as "oldd" and ARG4 as "newd". + case VKI_F_DUP2FD: ++ case VKI_F_DUP2FD_CLOEXEC: + PRINT("sys_fcntl[ARG3=='oldd', ARG4=='newd'] ( %ld, %ld, %ld, %ld )", + ARG1,ARG2,ARG3,ARG4); + PRE_REG_READ4(long, "fcntl", +@@ -3339,6 +3343,15 @@ POST(sys_fcntl) + ML_(record_fd_open_named)(tid, RES); + } + } ++ else if (ARG2 == VKI_F_DUPFD_CLOEXEC) { ++ if (!ML_(fd_allowed)(RES, "fcntl(DUPFD_CLOEXEC)", tid, True)) { ++ VG_(close)(RES); ++ SET_STATUS_Failure( VKI_EMFILE ); ++ } else { ++ if (VG_(clo_track_fds)) ++ ML_(record_fd_open_named)(tid, RES); ++ } ++ } + } + + PRE(sys_ioctl) +diff --git a/include/vki/vki-freebsd.h b/include/vki/vki-freebsd.h +--- a/include/vki/vki-freebsd.h ++++ b/include/vki/vki-freebsd.h +@@ -1554,6 +1554,10 @@ struct vki_dirent { + #define VKI_F_SETLK 12 /* set record locking information */ + #define VKI_F_SETLKW 13 /* F_SETLK; wait if blocked */ + #define VKI_F_SETLK_REMOTE 14 /* debugging support for remote locks */ ++#define VKI_F_READAHEAD 15 /* read ahead */ ++#define VKI_F_RDAHEAD 16 /* Darwin compatible read ahead */ ++#define VKI_F_DUPFD_CLOEXEC 17 /* Like F_DUPFD, but FD_CLOEXEC is set */ ++#define VKI_F_DUP2FD_CLOEXEC 18 /* Like F_DUP2FD, but FD_CLOEXEC is set */ + + /* for F_[GET|SET]FL */ + #define VKI_FD_CLOEXEC 1 /* actually anything with low bit set goes */ Property changes on: head/devel/valgrind-devel/files/missing_fcntls.patch ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +1 \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property