Discussion:
[capnproto] Memory leak at master since Sep 3
'Kenton Varda' via Cap'n Proto
2017-10-23 19:44:43 UTC
Permalink
Hi all,

FYI, if you build Cap'n Proto C++ from master, you may have been affected
by a memory leak introduced on September 3rd. The leak causes zero-sized
heap-allocated arrays often not to be freed. The Cap'n Proto RPC library
has been observed to allocate zero-sized arrays frequently.

Although the arrays have zero size, malloc() is required to return a unique
pointer value even for zero-sized allocations. So, each allocation likely
consumes 8 or 16 bytes. It takes quite a while for such leaks to consume
much memory, but a high-traffic long-running service can be affected.

The change that introduced this has been reverted at master.

If you use a release build, you were not affected. Note that we run leak
check analysis using Valgrind as part of pre-release tests, hence this
would have been caught before the next release. We should probably start
running said analysis as part of regular CI builds, so that this doesn't
happen again.

-Kenton
--
You received this message because you are subscribed to the Google Groups "Cap'n Proto" group.
To unsubscribe from this group and stop receiving emails from it, send an email to capnproto+***@googlegroups.com.
Visit this group at https://groups.google.com/group/capnproto.
Loading...