Opened 12 years ago

Closed 4 years ago

#8904 closed defect (invalid)

libsingular: memory leak in Matrix.act_on_polynomial

Reported by: Simon King Owned by: tbd
Priority: major Milestone: sage-duplicate/invalid/wontfix
Component: memleak Keywords: libsingular act_on_polynomial memleak
Cc: Martin Albrecht Merged in:
Authors: Reviewers: Frédéric Chapoton, Simon King
Report Upstream: N/A Work issues:
Branch: Commit:
Dependencies: Stopgaps:

Status badges

Description

There is a memory leak that occurs when mapping a multivariate polynomial using a matrix:

sage: R.<a,b>  =  QQ[]
sage: M = Matrix([[0,1],[1,0]])
sage: n = 0
sage: p = R.random_element()
sage: q = M.act_on_polynomial(p)
sage: mem = get_memory_usage()
sage: while(1):
....:     n+=1
....:     q = M.act_on_polynomial(p)
....:     if get_memory_usage()>mem:
....:         mem = get_memory_usage()
....:         print mem,n
....:
801.04296875 2
801.54296875 2011
802.04296875 4738
802.54296875 7406
803.04296875 10091
803.54296875 12809
804.04296875 15495
804.54296875 18171
805.04296875 20873
805.54296875 23561
806.04296875 26251
...

This does not occur if one maps the polynomial by a proper morphism:

sage: f = R.hom([M.act_on_polynomial(t) for t in R.gens()],R)
sage: while(1):
....:     n+=1
....:     q = f(p)
....:     if get_memory_usage()>mem:
....:         mem = get_memory_usage()
....:         print mem,n
....:

Change History (7)

comment:1 Changed 9 years ago by Jeroen Demeyer

Milestone: sage-5.11sage-5.12

comment:2 Changed 9 years ago by For batch modifications

Milestone: sage-6.1sage-6.2

comment:3 Changed 8 years ago by For batch modifications

Milestone: sage-6.2sage-6.3

comment:4 Changed 8 years ago by For batch modifications

Milestone: sage-6.3sage-6.4

comment:5 Changed 4 years ago by Frédéric Chapoton

Milestone: sage-6.4sage-duplicate/invalid/wontfix
Status: newneeds_review

no longer an issue in 8.3.beta2

comment:6 in reply to:  5 Changed 4 years ago by Simon King

Reviewers: Frédéric Chapoton, Simon King
Status: needs_reviewpositive_review

Replying to chapoton:

no longer an issue in 8.3.beta2

I can confirm. So, positive review with both of us as reviewers, I guess.

comment:7 Changed 4 years ago by Erik Bray

Resolution: invalid
Status: positive_reviewclosed

Presuming these are all correctly reviewed as either duplicate, invalid, or wontfix.

Note: See TracTickets for help on using tickets.