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 | |
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
-rw-r--r-- | erts/emulator/Makefile.in | 2 | ||||
-rw-r--r-- | erts/emulator/drivers/common/inet_drv.c | 3 | ||||
-rw-r--r-- | make/run_make.mk | 2 |
3 files changed, 5 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 diff --git a/make/run_make.mk b/make/run_make.mk index b2be384aa3..39c3668e50 100644 --- a/make/run_make.mk +++ b/make/run_make.mk @@ -27,6 +27,8 @@ include $(ERL_TOP)/make/target.mk +.PHONY: valgrind + opt debug purify quantify purecov valgrind gcov gprof lcnt: $(MAKE) -f $(TARGET)/Makefile TYPE=$@ |