diff options
author | Sverker Eriksson <[email protected]> | 2012-01-11 19:02:18 +0100 |
---|---|---|
committer | Sverker Eriksson <[email protected]> | 2012-01-11 19:02:18 +0100 |
commit | b8b3de6260240c7eb0d7bebec3eeb833bb4ff0d7 (patch) | |
tree | f5c8e068eb5a7abc111d72ff00dd50e62154573f /erts/emulator/drivers/common | |
parent | c823c58b1fa1b2d4903e1b16fda7e669b641c04f (diff) | |
parent | 2db25adbf63b6043fba3817c060cf5e32cdec343 (diff) | |
download | otp-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/emulator/drivers/common')
-rw-r--r-- | erts/emulator/drivers/common/inet_drv.c | 3 |
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 |