M2 icon indicating copy to clipboard operation
M2 copied to clipboard

bug in try, alarm, and ??= (augmented null coalescing assignment operator)

Open mahrud opened this issue 1 year ago • 0 comments

Try this, taken from tests/normal/alarm.m2:

R = QQ[vars(0..24)]
f = () -> (alarm 4; try res coker vars R else "ran out of time")
time f()

cokernel Matrix := Module => f -> f.cache.cokernel ??= subquotient(null, f)

R = QQ[vars(0..24)]
f = () -> (alarm 4; try res coker vars R else "ran out of time")
time f()

After the first run we get:

i3 : time f()
 -- used 5.55149s (cpu); 3.82313s (thread); 0s (gc)

o3 = ran out of time

But the second run never finishes. I believe this is what's failing in #3517 and #3522 (removed commits: c07017ec1a3f89b5aa0fba22f93a502ea5a64454 and 9b29e3df4df0eecae5c34e91b1460df934d79eda).

@d-torrance could you take a look?

mahrud avatar Oct 18 '24 12:10 mahrud