Are you sure that this is a bug in singular?
Two things: 1) I could not reproduce (on current develop, singular 4.4.1, ubuntu 24.04.4) a memory leak using Vincent's example above. Replacing `u = -u` with `u = 2 * y`, however, does leak.
2) I tried to reproduce the leak in singular, but couldn't. I did singular.console() and ran
option(mem);
ring R = (integer, 3, 2),(x,y), dp;
bigint cnt = 0;
bigint mem_start = memory(0);
bigint mem_used;
poly u;
while(1) {
u = 2 * y;
cnt++;
if (cnt % 1000 == 0) {
mem_used = memory(0) - mem_start;
print(cnt);
print(mem_used);
}
}
Note that I have no clue about how to use singular properly, and of course there might be a difference between singular and libsingular.
But I think it would be great to have something which is better to report to singular.
Martin