GNOME Bugzilla – Bug 625544
munit() with large n parameter leads to sigkill/oom
Last modified: 2013-01-15 20:21:11 UTC
Steps to reproduce: - Enter '=munit(10000)' into a cell (without quotes) After consuming a lot of memory, Gnumeric will be killed by the system. OpenOffice.org apparently caps the n parameter based on the number of columns in a sheet (http://www.openoffice.org/issues/show_bug.cgi?id=72898), but I'm not sure if that approach would work for Gnumeric.
I think you should file this against your computer. If you are asking for a ridiculously large matrix you should make sure that you have a good enough computer. Note that capping on the number of columns in a sheet does not make sense for expressions such as =sum(munit(10000)) since that needs only one cell.
*** This bug has been marked as a duplicate of bug 67569 ***
I'm fairly certain we don't want to go beyond sqrt(G_MAXINT).
I have implemented a limit of sqrt(G_MAXINT). That's about 46340 on 32-bit. My machine stille gets upset between ~7k and that limit.
I have limited MUNIT to what would fit on a sheet. As comment 1 points out, one could think of uses beyond that, but I really don't see why we should risk thrashing the system over this.
I really, really don't like this! Why should I be prohibited to calculate =sum(munit(200))? Since I use Gnumeric for calculations, my sheets are frequently only 128 by 128.
Ok, the limit is now 1000. I don't really care what the limit is, just that a typo won't bring down Gnumeric.