Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
C
capnproto
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
capnproto
Commits
b483b77b
Commit
b483b77b
authored
Dec 07, 2013
by
Kenton Varda
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix valgrind issues.
parent
2d67f0b8
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
2 deletions
+12
-2
async-io.c++
c++/src/kj/async-io.c++
+12
-2
No files found.
c++/src/kj/async-io.c++
View file @
b483b77b
...
@@ -234,8 +234,17 @@ private:
...
@@ -234,8 +234,17 @@ private:
ssize_t
writeResult
;
ssize_t
writeResult
;
KJ_NONBLOCKING_SYSCALL
(
writeResult
=
::
writev
(
fd
,
iov
.
begin
(),
iov
.
size
()))
{
KJ_NONBLOCKING_SYSCALL
(
writeResult
=
::
writev
(
fd
,
iov
.
begin
(),
iov
.
size
()))
{
// error
// Error.
return
READY_NOW
;
// We can't "return kj::READY_NOW;" inside this block because it causes a memory leak due to
// a bug that exists in both Clang and GCC:
// http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33799
// http://llvm.org/bugs/show_bug.cgi?id=12286
goto
error
;
}
if
(
false
)
{
error
:
return
kj
::
READY_NOW
;
}
}
// A negative result means EAGAIN, which we can treat the same as having written zero bytes.
// A negative result means EAGAIN, which we can treat the same as having written zero bytes.
...
@@ -612,6 +621,7 @@ Promise<Array<SocketAddress>> SocketAddress::lookupHost(
...
@@ -612,6 +621,7 @@ Promise<Array<SocketAddress>> SocketAddress::lookupHost(
}
}
SocketAddress
addr
;
SocketAddress
addr
;
memset
(
&
addr
,
0
,
sizeof
(
addr
));
// mollify valgrind
if
(
params
.
host
==
"*"
)
{
if
(
params
.
host
==
"*"
)
{
// Set up a wildcard SocketAddress. Only use the port number returned by getaddrinfo().
// Set up a wildcard SocketAddress. Only use the port number returned by getaddrinfo().
addr
.
wildcard
=
true
;
addr
.
wildcard
=
true
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment