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

number_field_* leaks caused by gen.pyx's type(gen self) #4117

Closed
sagetrac-mabshoff mannequin opened this issue Sep 14, 2008 · 4 comments
Closed

number_field_* leaks caused by gen.pyx's type(gen self) #4117

sagetrac-mabshoff mannequin opened this issue Sep 14, 2008 · 4 comments
Assignees
Milestone

Comments

@sagetrac-mabshoff
Copy link
Mannequin

sagetrac-mabshoff mannequin commented Sep 14, 2008

We leak medium to massive amount of memory in a lot of number field related code. This is caused by

     def type(gen self):
        return str(type_name(typ(self.g)))

in gen.pyx. The regular and obvious fix causes segfualts in other places (i.e. due to integer.pyx), so I am attaching a workaround fix that has some performance penalty.

Cheers,

Michael

Component: memleak

Issue created by migration from https://trac.sagemath.org/ticket/4117

@sagetrac-mabshoff sagetrac-mabshoff mannequin added this to the sage-3.1.2 milestone Sep 14, 2008
@sagetrac-mabshoff sagetrac-mabshoff mannequin added t: bug labels Sep 14, 2008
@sagetrac-mabshoff sagetrac-mabshoff mannequin self-assigned this Sep 14, 2008
@sagetrac-mabshoff
Copy link
Mannequin Author

sagetrac-mabshoff mannequin commented Sep 14, 2008

Attachment: trac_4117.patch.gz

This is a diff with some work around code

@craigcitro
Copy link
Member

Different fix for the same problem

@sagetrac-mabshoff
Copy link
Mannequin Author

sagetrac-mabshoff mannequin commented Sep 14, 2008

comment:2

Attachment: trac-4117.patch.gz

Merged trac-4117.patch in Sage 3.1.2.rc3

@sagetrac-mabshoff sagetrac-mabshoff mannequin closed this as completed Sep 14, 2008
@jdemeyer
Copy link

comment:3

I wonder why this was a memleak. The original code looks correct, so either there was a bug in PARI/GP, a bug in Cython or a mis-identified memleak.

After 9 years, I am reverting this is in sagemath/cypari2@8f8ec55

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants