Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Memory leak #42

Open
dpanech opened this issue Jun 11, 2023 · 0 comments
Open

Memory leak #42

dpanech opened this issue Jun 11, 2023 · 0 comments

Comments

@dpanech
Copy link

dpanech commented Jun 11, 2023

Leaks memory when passed an expression that returns a non-existent hash value (which should be effectively undef). For example the following loop leaks ~70 MiB per second on my system.

use Clone;
my $data = {};
while(1) {
    Clone::clone ($data->{no_such_key});
};

However if you save the hash value in an intermediate variable, it doesn't leak:

use Clone;
my $data = {};
while(1) {
    my $tmp = $data->{no_such_key};
    Clone::clone ($tmp);
};

Environment
I was able to reproduce it in these environments:

  • Clone 0.46, perl v5.30.1, CentOS 7 x86_64
  • Clone 0.34, perl v5.16.3, CentOS 7 x86_64,
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant