[Swan-dev] tools for detecting NSS object leaks
Andrew Cagney
andrew.cagney at gmail.com
Wed Feb 13 21:53:43 UTC 2019
The awk script:
testing/utils/count-pointers.awk
was written to track NSS pointers. It assumes that they are
debug-logged in a consistent way. Invoke it as:
$ awk -f testing/utils/count-pointers.awk
testing/pluto/ikev2-03-basic-rawrsa/OUTPUT/west.pluto.log
testing/pluto/ikev2-03-basic-rawrsa/OUTPUT/west.pluto.log:310:
release: pe at 0x7ff34d2a3fc8 unknown: | free_event_entry: release
EVENT_NULL-pe at 0x7ff34d2a3fc8
hmm, bit-root.
valgrind is useless as NSS maintains its own heap.
On Wed, 13 Feb 2019 at 16:44, D. Hugh Redelmeier <hugh at mimosa.com> wrote:
>
> I spent yesterday discovering and fixing a few leaks of PK11SymKey
> objects. I happened upon them by reading and trying to understand the
> code.
>
> Do we have any good tools that would help discover leaks of NSS objects?
>
> Even a count of live objects would be useful: we could log this at various
> times and then look for anomalies.
>
> Leak Detective doesn't work on NSS objects. I guess we could wrap them
> but that seems awkward and a lot of work.
>
> I understand that valgrind could do the job, but I'd prefer something that
> could be enabled in all our tests.
> _______________________________________________
> Swan-dev mailing list
> Swan-dev at lists.libreswan.org
> https://lists.libreswan.org/mailman/listinfo/swan-dev
More information about the Swan-dev
mailing list