dart-sdk/sdk
Lasse R.H. Nielsen d8fa6fe255 Fix bug in VM _CompactHashIterable.
The iterable is used for the `keys` and `values` of `LinkedHashMap`.
The original code remembered the internal data list and used-count
when the iterable was created, and if the iterable was modified
between creating and iterating, the iterated values would not match
the map.
The solution is to not cache those values, and read them from the
hash table when creting the `Iterator` instead.

Fixes #48282

Tested: Added regression test to corelib/map_test
Bug: https://dartbug.com/48282
Change-Id: I79310615e7090556e6f45b0d7f297755951ef046
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/312263
Commit-Queue: Lasse Nielsen <lrn@google.com>
Reviewed-by: Slava Egorov <vegorov@google.com>
2023-07-04 11:00:50 +00:00
..
bin [dart2wasm] Add option and target for stringref. 2023-06-21 14:25:38 +00:00
lib Fix bug in VM _CompactHashIterable. 2023-07-04 11:00:50 +00:00
.gitignore [sdk] Generate a version file for the unpatched SDK 2022-05-05 10:36:05 +00:00
api_readme.md [docs] fix a grammar issue in the sdk readme 2023-04-26 18:25:55 +00:00
BUILD.gn [dart2wasm] Add option and target for stringref. 2023-06-21 14:25:38 +00:00
OWNERS [infra] Add OWNERS to the Dart SDK 2022-02-14 14:06:34 +00:00