This repository has been archived by the owner on Jun 1, 2023. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 17
protect hash iter with a changed hash #117
Comments
rurban
pushed a commit
that referenced
this issue
Mar 27, 2016
Disallow any changes to hashes while iterating over them. => Attempt to change hash while iterating over it Implements GH #117
Passes almost all CPAN tests.
|
rurban
pushed a commit
that referenced
this issue
Feb 4, 2018
Disallow any changes to hashes while iterating over them. => Attempt to change hash while iterating over it Implements GH #117
rurban
pushed a commit
that referenced
this issue
Feb 4, 2018
We now generally disallow destructive iterators, adding or removing a key during iteration. But we do allow changing a value. Get the old unrecommended behavior with use hashiter. See GH #117. WIP. crashes in Zlib: return inflateResetKeep(strm)
rurban
added a commit
that referenced
this issue
Aug 27, 2018
4.06 2018-08-22 (rurban) - Fix overloaded eq/ne comparisons (GH #116 by demerphq, GH #117 by Graham Knopp): detect strings, protect from endless recursion. false is now ne "True". clarify eq/ne rules in the docs. 4.05 2018-08-19 (rurban) - Set decoded type (PR #115 by Pali) - Add json_type_weaken (PR #114 by Pali) - Fix tests for 5.6 (rurban, pali) 4.04 2018-06-22 (rurban) - Fix bignum NaN/inf handling (#78 reported by Slaven Rezic) - Move author tests to xt/ as suggested in #106, added a make xtest target. Fixes a test fail with ASAN. 4.03 2018-06-21 (rurban) - Add sereal cpanel_json_xs type (#110 James Rouzier) - Fix bencode/bdecode methods in cpanel_json_xs (#111 Fulvio Scapin) - Overload ne operator for JSON::PP::Boolean (#107 tevfik1903) - Add a missing semicolon to a documentation example (#104 E. Choroba) 4.02 2018-02-27 (rurban) - Add encoder indent_length method (#103 rouzier), previously hard-coded to 3.
rurban
pushed a commit
that referenced
this issue
Sep 13, 2018
Disallow any changes to hashes while iterating over them. => Attempt to change hash while iterating over it Implements GH #117
rurban
pushed a commit
that referenced
this issue
Sep 13, 2018
We now generally disallow destructive iterators, adding or removing a key during iteration. But we do allow changing a value. Get the old unrecommended behavior with use hashiter. See GH #117. WIP. crashes in Zlib: return inflateResetKeep(strm)
Merged into 5.29.0c |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
When iterating over a hash, check if the hash structure was changed while iterating over it (by side effect or a thread).
Disallow any changes to hash keys while iterating over them.
=> error "Attempt to change hash while iterating over it"
Internally uses HvAUX timestamp fields, bumped on each change. This is safer than the last_rand field.
Add a new
use hashiter
pragma to allow changes as previously while iterating over the hash.Originally I even forbid changing values. For now we disallow insert and deletion, even with deferred LAZYDEL.
Need to test many CPAN modules, and provide distroprefs patches.
Note: This was CM-663
The text was updated successfully, but these errors were encountered: