dart-sdk/runtime/platform
Martin Kustermann d822f36f15 VM: Fix memory leak during shutdown
The way runtime/platform/hashmap.h:HashMap was implemented so far did not allow
deleting elements while iterating over the map. If one iterated like this

  HashMap::Entry* cursor = map.Start();
  while (cursor != NULL) {
    if (cond) {
      map.Remove(cursor->key, cursor->hash);
    }
    cursor = map.Next(cursor);
  }

Then the iteration `cursor` will skip elements. This is due to the fact that
`HashMap::Remove()` is left-rotating elements in certain cases and
`HashMap::Next()` will unconditionally advance to the next position in the
backing store.

PROBLEM IS: There was existing code which did remove elements while iterating
over a HashMap.

R=fschneider@google.com

Review URL: https://codereview.chromium.org/2533303005 .
2016-11-30 23:52:04 +01:00
..
address_sanitizer.h Add .clang-format and run clang-format on runtime/platform. 2016-11-03 14:25:16 -07:00
assert.cc Retry landing cl for issue with TSAN. 2016-11-23 15:40:26 -08:00
assert.h Add .clang-format and run clang-format on runtime/platform. 2016-11-03 14:25:16 -07:00
c99_support_win.h Add .clang-format and run clang-format on runtime/platform. 2016-11-03 14:25:16 -07:00
floating_point.h Add .clang-format and run clang-format on runtime/platform. 2016-11-03 14:25:16 -07:00
floating_point_win.cc Add .clang-format and run clang-format on runtime/platform. 2016-11-03 14:25:16 -07:00
floating_point_win.h Make header include guards great again 2016-10-26 00:26:03 -07:00
globals.h VM: Fix Flutter build. 2016-11-18 15:48:01 +01:00
hashmap.cc VM: Fix memory leak during shutdown 2016-11-30 23:52:04 +01:00
hashmap.h VM: Fix memory leak during shutdown 2016-11-30 23:52:04 +01:00
inttypes_support_win.h Make header include guards great again 2016-10-26 00:26:03 -07:00
math.h Make header include guards great again 2016-10-26 00:26:03 -07:00
memory_sanitizer.h Add .clang-format and run clang-format on runtime/platform. 2016-11-03 14:25:16 -07:00
platform_headers.gypi - Remove the legacy debug protocol. 2015-12-03 17:46:02 -08:00
platform_sources.gypi - Remove the legacy debug protocol. 2015-12-03 17:46:02 -08:00
signal_blocker.h Add .clang-format and run clang-format on runtime/platform. 2016-11-03 14:25:16 -07:00
text_buffer.cc Add .clang-format and run clang-format on runtime/platform. 2016-11-03 14:25:16 -07:00
text_buffer.h Add .clang-format and run clang-format on runtime/platform. 2016-11-03 14:25:16 -07:00
utils.cc Add .clang-format and run clang-format on runtime/platform. 2016-11-03 14:25:16 -07:00
utils.h Add .clang-format and run clang-format on runtime/platform. 2016-11-03 14:25:16 -07:00
utils_android.h Make header include guards great again 2016-10-26 00:26:03 -07:00
utils_fuchsia.h Make header include guards great again 2016-10-26 00:26:03 -07:00
utils_linux.h Add .clang-format and run clang-format on runtime/platform. 2016-11-03 14:25:16 -07:00
utils_macos.h Make header include guards great again 2016-10-26 00:26:03 -07:00
utils_win.h Make header include guards great again 2016-10-26 00:26:03 -07:00