aboutsummaryrefslogtreecommitdiffstats
path: root/erts
diff options
context:
space:
mode:
authorSverker Eriksson <[email protected]>2012-01-11 19:02:18 +0100
committerSverker Eriksson <[email protected]>2012-01-11 19:02:18 +0100
commitb8b3de6260240c7eb0d7bebec3eeb833bb4ff0d7 (patch)
treef5c8e068eb5a7abc111d72ff00dd50e62154573f /erts
parentc823c58b1fa1b2d4903e1b16fda7e669b641c04f (diff)
parent2db25adbf63b6043fba3817c060cf5e32cdec343 (diff)
downloadotp-b8b3de6260240c7eb0d7bebec3eeb833bb4ff0d7.tar.gz
otp-b8b3de6260240c7eb0d7bebec3eeb833bb4ff0d7.tar.bz2
otp-b8b3de6260240c7eb0d7bebec3eeb833bb4ff0d7.zip
Merge branch 'sverk/inet_drv-valgrind-uninitialised' into maint
* sverk/inet_drv-valgrind-uninitialised: otp,erts: Add phony valgrind target erts: Better suppression of uninitialised sctp_sndrcvinfo
Diffstat (limited to 'erts')
-rw-r--r--erts/emulator/Makefile.in2
-rw-r--r--erts/emulator/drivers/common/inet_drv.c3
2 files changed, 3 insertions, 2 deletions
diff --git a/erts/emulator/Makefile.in b/erts/emulator/Makefile.in
index a5d8217545..45cf540994 100644
--- a/erts/emulator/Makefile.in
+++ b/erts/emulator/Makefile.in
@@ -426,7 +426,7 @@ endif
@set -e ; cd zlib && $(MAKE) clean
rm -f $(OBJS) $(OBJDIR)/libepcre.a
-.PHONY: all zlib clean
+.PHONY: all zlib clean valgrind
docs:
diff --git a/erts/emulator/drivers/common/inet_drv.c b/erts/emulator/drivers/common/inet_drv.c
index eeaa4d24ea..47a99fdbe6 100644
--- a/erts/emulator/drivers/common/inet_drv.c
+++ b/erts/emulator/drivers/common/inet_drv.c
@@ -6194,6 +6194,7 @@ static int sctp_set_opts(inet_descriptor* desc, char* ptr, int len)
type = SCTP_DEFAULT_SEND_PARAM;
arg_ptr = (char*) (&arg.sri);
arg_sz = sizeof ( arg.sri);
+ VALGRIND_MAKE_MEM_DEFINED(arg_ptr, arg_sz); /*suppress "uninitialised bytes"*/
break;
}
case SCTP_OPT_EVENTS:
@@ -10299,7 +10300,6 @@ static void packet_inet_command(ErlDrvData e, char* buf, ErlDrvSizeT len)
cmsg.hdr.cmsg_level = IPPROTO_SCTP;
cmsg.hdr.cmsg_type = SCTP_SNDRCV;
cmsg.hdr.cmsg_len = CMSG_LEN(sizeof(*sri));
- VALGRIND_MAKE_MEM_DEFINED(&cmsg, (char*)sri - (char*)&cmsg); /*suppress padding as "uninitialised bytes"*/
data_len = (buf + len) - ptr;
/* The whole msg.
@@ -10313,6 +10313,7 @@ static void packet_inet_command(ErlDrvData e, char* buf, ErlDrvSizeT len)
mhdr.msg_iovlen = 1;
mhdr.msg_control = cmsg.ancd; /* For ancilary data */
mhdr.msg_controllen = cmsg.hdr.cmsg_len;
+ VALGRIND_MAKE_MEM_DEFINED(mhdr.msg_control, mhdr.msg_controllen); /*suppress "uninitialised bytes"*/
mhdr.msg_flags = 0; /* Not used with "sendmsg" */
/* Now do the actual sending. NB: "flags" in "sendmsg" itself are NOT