I see Jonas backported the mapping_rehash-rewrite grubba did in 7.7 to 7.6 and 7.4. This is probably good, but is there no testcase for the problem it should fix?
Here is what we used to determine whether the fix works or not:
class A { int __hash() { return 0; } }; object t = thread_create(lambda() { mapping m = ([ ]); while(1) m[A()] = 1; });
Wait for a few seconds and see whether the Pike crashes or not. If not it will continue to eat memory but that's expected from the infinite loop.
As a sidenote I'd like to comment Jonas for actually writing what he was doing when backporting stuff. I wish you could all do that. :-)
"Backported from 7.7" as the only checking message gives me the job of finding what that dangling pointer is supposed to be replaced with in the CHANGLOG when reviewing all patches. Feel free to copy the message that was used in the original checkin but add a backport note.
I know exactly how it feels doing that hunting since I normally do the same whenever we release Roxen updates. Still, I almost always forget to keep CHANGES in sync so thanks for taking care of that part.
pike-devel@lists.lysator.liu.se