Opened 4 years ago
Closed 4 years ago
#26928 closed defect (duplicate)
matrix argument parsing eats all the memory instead of rising an error
Reported by: | Thierry Monteil | Owned by: | |
---|---|---|---|
Priority: | major | Milestone: | sage-duplicate/invalid/wontfix |
Component: | linear algebra | Keywords: | |
Cc: | Merged in: | ||
Authors: | Reviewers: | ||
Report Upstream: | N/A | Work issues: | |
Branch: | Commit: | ||
Dependencies: | Stopgaps: |
Description
It has been reported on this ask question, here is a minimal example:
matrix([ZZ])
Change History (3)
comment:1 Changed 4 years ago by
comment:3 Changed 4 years ago by
Milestone: | sage-8.6 → sage-duplicate/invalid/wontfix |
---|---|
Resolution: | → duplicate |
Status: | new → closed |
Note: See
TracTickets for help on using
tickets.
Why is this a bug? ZZ is an iterable, as you can see from
so the user is asking to construct a matrix with one row and countably infinitely many columns. If there would be a way to tell that an iterator is infinite, we could raise an error, but python does not provide such functionality (thanks to the stopping problem). We can't really do anything about this. It does seem appropriate that
matrix
accepts an iterable that produces iterables.