A Python program spun inside mpbarrett_reduce, attempting the
computation in this testcase. The test program hung too, and debugging
it yielded the following information. On entry, d and m were equal; for
some reason, in the MP_DEST call, d was being aliased to m again, even
though m was still active; of course, m/d now had refcount 1, and all
hell broke loose when m got dropped.
A ground-up rebuild made the problem go away, so maybe it was just fluff
in the build tree. I'm leaving this test here anyway so that it'll
catch a return of the bug, and maybe I can investigate it more carefully
then.
25906467774034212974484417859588980567136610347807401817990462701
514778499400157641662814932021958856708417966520837469125919104431
123456789012345678901234567890123456789012345678901234567890;
+
+ # --- Strange bug ---
+ #
+ # Strange memory corruption bug causing mpbarrett_reduce to hang.
+ # Seems to have vanished on a clean rebuild so maybe this was just build
+ # fluff or something. Leave it here to pick up regression.
+
+ 30916300184138066757562815127455898754391418637651479989257882011612153138316483396290143656363307389355307404813205623380378799585065876990874918745873480056891738964426752
+ 2 44329
+ 10975270953088118598390528358454369816072092233138947812823085741431681835772475760228604878294514156761050649439713085882651077696501584961485141097470430535290622475239424;
}
# --- Simultaneous exponentiation ---