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 leaks #49

Open
wchristian opened this issue Aug 4, 2023 · 4 comments
Open

memory leaks #49

wchristian opened this issue Aug 4, 2023 · 4 comments

Comments

@wchristian
Copy link

i use Crypt::PKCS10, which caused some severe memory leaks from Convert::ASN1, which are partly caused by how that module uses it, i think, but could also be addressed in Convert::ASN1

please have a read of the PR and explanations here: openxpki/Crypt-PKCS10#8

@wchristian
Copy link
Author

addendum, here's a script i used to help find the causes, however ultimately fiddling with PKCS10 and devel::gladiator and devel::findref led me to my findings

https://gist.github.com/wchristian/905289b92dbd205e2e72eb293867b5a6#file-asn_leak-t

@timlegge
Copy link
Collaborator

timlegge commented Aug 4, 2023

Thanks I will take a look but happy to accept patches too.

@wchristian
Copy link
Author

i just updated the patch under openxpki/Crypt-PKCS10#8 because my initial stab at it was buggy

as for patches tim, i really don't understand the code of ASN1 and we don't use it directly, so i am happy to provide insights and answer questions, but don't feel comfortable with providing a patch for the problem of the global arrays

meanwhile i could suggest making ->find call clone on its return value before returning, but i am not sure if that is appropriate under all circumstances. what is your view on that?

@timlegge
Copy link
Collaborator

timlegge commented Aug 8, 2023

@wchristian "i really don't understand the code of ASN1 " either :-) I took on comaint when there was a security issue and no one had taken on merging a patch for a new release. At the moment I am in "caretaker role" if there are low risk changes/bug fixes I don't mind issuing a new release. I may take a look at this issue at some point but the recursive functions hurt my head...

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

2 participants