aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/drivers/common
diff options
context:
space:
mode:
authorSverker Eriksson <[email protected]>2011-12-13 20:20:02 +0100
committerSverker Eriksson <[email protected]>2011-12-19 16:09:40 +0100
commit7fcc77d7b8ef838c1e5633acb9330120cac22cd3 (patch)
treeca77b0e27af1965c9512b2de75323ec921306248 /erts/emulator/drivers/common
parent2799d29ad1123b5128498ea89d2ff5678e59b545 (diff)
downloadotp-7fcc77d7b8ef838c1e5633acb9330120cac22cd3.tar.gz
otp-7fcc77d7b8ef838c1e5633acb9330120cac22cd3.tar.bz2
otp-7fcc77d7b8ef838c1e5633acb9330120cac22cd3.zip
erts: Better suppression of uninitialised sctp_sndrcvinfo
Diffstat (limited to 'erts/emulator/drivers/common')
-rw-r--r--erts/emulator/drivers/common/inet_drv.c3
1 files changed, 2 insertions, 1 deletions
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