Merge lp:~michihenning/unity-scopes-api/fix-valgrind-complaints into lp:unity-scopes-api

Proposed by Michi Henning
Status: Merged
Approved by: Paweł Stołowski
Approved revision: 304
Merged at revision: 309
Proposed branch: lp:~michihenning/unity-scopes-api/fix-valgrind-complaints
Merge into: lp:unity-scopes-api
Diff against target: 37 lines (+18/-1)
2 files modified
test/gtest/scopes/internal/smartscopes/RaiiServer.h (+3/-1)
valgrind-suppress (+15/-0)
To merge this branch: bzr merge lp:~michihenning/unity-scopes-api/fix-valgrind-complaints
Reviewer Review Type Date Requested Status
Paweł Stołowski (community) Approve
PS Jenkins bot (community) continuous-integration Approve
Review via email: mp+249030@code.launchpad.net

Commit message

Added valgrind suppression for leak in net-cpp. Added work-around for valgrind complaint about invalid envp being passed when calling execl().

Description of the change

Added valgrind suppression for leak in net-cpp. Added work-around for valgrind complaint about invalid envp being passed when calling execl().

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
Paweł Stołowski (stolowski) wrote :

+1

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'test/gtest/scopes/internal/smartscopes/RaiiServer.h'
2--- test/gtest/scopes/internal/smartscopes/RaiiServer.h 2014-12-08 17:19:40 +0000
3+++ test/gtest/scopes/internal/smartscopes/RaiiServer.h 2015-02-09 07:56:24 +0000
4@@ -61,7 +61,9 @@
5 throw unity::ResourceException("Write pipe duplication failed");
6 }
7
8- execl(server_path.c_str(), server_path.c_str(), arg.c_str(), NULL);
9+ // execle() instead of execl(). Otherwise, valgrind complains about
10+ // an invalid envp being passed from execl() to execle().
11+ execle(server_path.c_str(), server_path.c_str(), arg.c_str(), nullptr, nullptr);
12 throw unity::ResourceException("Failed to execute fake server script");
13 default: // parent
14 close(pipefd[1]); // close write
15
16=== modified file 'valgrind-suppress'
17--- valgrind-suppress 2015-01-16 07:28:03 +0000
18+++ valgrind-suppress 2015-02-09 07:56:24 +0000
19@@ -190,3 +190,18 @@
20 fun:zmq_getsockopt
21 }
22
23+# Leaks in net-cpp. See bug #1419620
24+# TODO: Remove these two suppressions once that bug is fixed.
25+{
26+ net_cpp_client_leak
27+ Memcheck:Leak
28+ ...
29+ fun:_ZN4core3net4http4impl4curl6Client3getERKNS1_7Request13ConfigurationE
30+}
31+
32+{
33+ net_cpp_client_leak_2
34+ Memcheck:Leak
35+ ...
36+ fun:_ZN4core3net4http11make_clientEv
37+}

Subscribers

People subscribed via source and target branches

to all changes: