Thanks again for the input, I have a much better idea of what I'm looking
for now. Currently I have a list of leaks that ends with a message
indicating that I have "10108 bytes leaked in 342 chunks." This number no
longer increases as more connections are received. However, am I correct
in assuming that the above number is the amount I am leaking per
connection, or is it the combined total leaked throughout the
execution of the program?
I have compiled openssl with more debugging information, and have included
the reference count information printed out below. Are the numbers
below a cause for concern, keeping in mind that the program currently
accepts an infinite number of connections, and thus (supposedly) frees
everything but the context information. My guess, which seems to have
been confirmed by list members, is that I'm failing to free an SSL_SESSION
object somewhere. I am calling SSL_free on my connection object. I'm not
sure what else to do.
080FDF40: 1:EVP_PKEY
080FDEC0: 0:BIO
08101C30: 2:EVP_PKEY
08101C30: 1:EVP_PKEY
080FE448: 1:X509
080FE170: 0:BIO
080FF638: 0:RSA
081021E0: 0:BIO
080FF2E0: 0:DH
081159E8: 0:BIO
08102850: 0:SSL
081032E8: 0:BIO
08117B48: 1:SSL_SESSION
08102950: 0:CERT
081027C0: 1:RSA
08101F58: 0:DH
080FE448: 1:X509
080FDF40: 1:EVP_PKEY
080FD818: 1:SSL_CTX
On Tuesday 17 July 2001 07:24 pm, you wrote:
> As the other two Stephen commented, look for the top-most structures,
that
> is the higher-level structures that contain other structures. From your
> output below, it looks like the top-most structure is the one allocated
at
> ssl_sess.c:114. This is the SSL_SESSION object allocated by
> SSL_SESSION_new(). You seem to have leaked four of them.
>
> -----Original Message-----
> From: C. Gould [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, 18 July 2001 5:07 AM
> To: [EMAIL PROTECTED]
> Subject: Re: finding memory leaks
>
>
>
> Ok, thanks a bunch. I got that working, and found what appears to be a
> decent number of memory leaks. I know my application is leaking memory,
> but the output i'm getting isn't really of much use to me. Could anyone
> assist me in interpreting the snippet of output I've attached below.
> There is more, but I left it out because of space considerations. What
is
> the best way to track down the source of these leaks. Is it safe to
> assume these are my own fault, or could the OpenSSL library be leaking
> some memory?
>
>
>
> -- snip --
>
> [14:53:30] 225 file=x_algor.c, line=102, thread=14734, number=8,
> address=080F6E30
> [14:53:30] 112 file=o_names.c, line=160, thread=14734, number=16,
> address=080F1F50
> [14:53:30] 249 file=a_bytes.c, line=114, thread=14734, number=21,
> address=080F7588
> [14:53:30] 311 file=asn1_lib.c, line=371, thread=14734, number=16,
> address=080F8CB0
> [14:57:28] 4202 file=lhash.c, line=193, thread=14734, number=12,
> address=0810D620
> [14:53:30] 57 file=o_names.c, line=160, thread=14734, number=16,
> address=080F16A8
> [14:53:30] 201 file=bn_lib.c, line=335, thread=14734, number=72,
> address=080F6558
> [14:56:43] 2217 file=stack.c, line=122, thread=14734, number=20,
> address=080F9C80
> [14:53:30] 223 file=buffer.c, line=67, thread=14734, number=12,
> address=080F6DA0
> [14:53:30] 0 file=o_names.c, line=160, thread=14734, number=16,
> address=080F2648
> [14:53:30] 8 file=o_names.c, line=160, thread=14734, number=16,
> address=080F0EC0
> [14:53:30] 272 file=a_bytes.c, line=114, thread=14734, number=3,
> address=080F7D70
> [14:53:30] 100 file=evp_pbe.c, line=120, thread=14734, number=16,
> address=080F3E90
> [14:53:30] 285 file=a_object.c, line=268, thread=14734, number=24,
> address=080F8378
> [14:57:12] 3594 file=ssl_sess.c, line=114, thread=14734, number=200,
> address=08109E38
> [14:53:30] 246 file=asn1_lib.c, line=371, thread=14734, number=16,
> address=080F7498
> [14:56:43] 2216 file=ssl_sess.c, line=114, thread=14734, number=200,
> address=08108E08
> [14:53:30] 51 file=o_names.c, line=160, thread=14734, number=16,
> address=080F15B8
> [14:56:54] 2930 file=lhash.c, line=193, thread=14734, number=12,
> address=0810A650
> [14:57:25] 4018 file=ssl_sess.c, line=114, thread=14734, number=200,
> address=0810EC88
> [14:53:30] 220 file=x_name.c, line=221, thread=14734, number=16,
> address=080F6CB0
> [14:53:30] 2 file=o_names.c, line=160, thread=14734, number=16,
> address=080F0DD0
> [14:53:30] 269 file=asn1_lib.c, line=371, thread=14734, number=16,
> address=080F7C80
> [14:56:44] 2429 file=stack.c, line=122, thread=14734, number=20,
> address=080FA2B8
> [14:57:15] 3778 file=lhash.c, line=193, thread=14734, number=12,
> address=08111350
> [14:53:30] 97 file=evp_pbe.c, line=120, thread=14734, number=16,
> address=080F3DA0
> [14:57:22] 3990 file=lhash.c, line=193, thread=14734, number=12,
> address=08111320
> [14:53:30] 32 file=o_names.c, line=160, thread=14734, number=16,
> address=080F0D70
> [14:53:30] 161 file=stack.c, line=122, thread=14734, number=20,
> address=080F53A8
> [14:53:30] 243 file=a_object.c, line=242, thread=14734, number=3,
> address=080F73A8
> [14:53:30] 305 file=x_exten.c, line=123, thread=14734, number=20,
> address=080F8AD0
> [14:53:30] 45 file=o_names.c, line=160, thread=14734, number=16,
> address=080F14C8
> [14:53:30] 329 file=bn_lib.c, line=335, thread=14734, number=12,
> address=080F5BC0
> [14:53:30] 197 file=bn_lib.
______________________________________________________________________
OpenSSL Project http://www.openssl.org
User Support Mailing List [EMAIL PROTECTED]
Automated List Manager [EMAIL PROTECTED]