Subject: | Memory not reclaimed when CTX object goes out of scope |
#!/usr/bin/perl # 5.18.4
#
# Allocated storage not reclaimed when
# Crypt::OpenSSL::Bignum::CTX object no
# longer in scope.
use Crypt::OpenSSL::Bignum 0.04;
sub leak {
my $ctx = Crypt::OpenSSL::Bignum::CTX->new();
}
my $count = 5E7; # more than enough to leak 2Gb
while ($count--) {
leak;
} #
#
#
#
############### :-(
#############################