Ryan Macnak
1d05591fbb
[vm] Produce clearer error messages when operator new fails.
...
TEST=bots
Bug: https://github.com/dart-lang/sdk/issues/43642
Bug: https://github.com/dart-lang/sdk/issues/43862
Change-Id: I598a26a56762c141a1aef972f7d32f2c9594b244
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/171802
Commit-Queue: Ryan Macnak <rmacnak@google.com >
Reviewed-by: Alexander Aprelev <aam@google.com >
Reviewed-by: Martin Kustermann <kustermann@google.com >
2020-11-13 19:07:20 +00:00
Zach Anderson
27c79f9459
[vm] Propagate more UTF8 conversion errors
...
Change-Id: I8d4f3a892a51bed8b922961bd74bcad727f66508
Reviewed-on: https://dart-review.googlesource.com/73280
Commit-Queue: Zach Anderson <zra@google.com >
Reviewed-by: Alexander Markov <alexmarkov@google.com >
Reviewed-by: Siva Annamalai <asiva@google.com >
2018-09-06 02:23:21 +00:00
Zachary Anderson
6cd8a79078
VM: Re-format to use at most one newline between functions
...
R=asiva@google.com
Review-Url: https://codereview.chromium.org/2974233002 .
2017-07-13 08:08:37 -07:00
Martin Kustermann
37dfdbdc97
VM: Remove unused (and incomplete) HashMap::Remove() function
...
R=vegorov@google.com
Review URL: https://codereview.chromium.org/2542103002 .
2016-12-01 13:51:49 +01:00
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
Ryan Macnak
61bf8abd75
Make fatal out of memory messages uniform.
...
Add checks in a few more places with large allocations.
R=fschneider@google.com
Review URL: https://codereview.chromium.org/2418323002 .
2016-10-19 16:37:59 -07:00
Zach Anderson
581939d8b6
Retry: Fixes memory leaks in the eventhandler
...
Crashes were caused by removing from a std::map while iterating over it.
R=asiva@google.com
Review URL: https://codereview.chromium.org/2231123002 .
2016-08-10 15:20:30 -07:00
Zachary Anderson
bf085120f6
Revert: Fixes leak of duplicate command line environment strings
...
For bot crashes on Mac
Review URL: https://codereview.chromium.org/2229973002 .
2016-08-09 15:36:57 -07:00
Zachary Anderson
92abe83b26
Fixes memory leaks in the eventhandler
...
These probably only happen when the VM is going down after an unhandled
exception, but I want to fix them anyway.
R=asiva@google.com
Review URL: https://codereview.chromium.org/2228503007 .
2016-08-09 15:20:50 -07:00
sgjesse@google.com
2e857ff194
Put HashMap class in dart namespace.
...
R=sgjesse@google.com
Signed-off-by: Thiago Farina <tfarina@chromium.org >
Review URL: https://codereview.chromium.org//14572004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@22175 260f80e4-7a28-3924-810f-c04153c831b5
2013-04-30 11:48:48 +00:00
sgjesse@google.com
05e5da6dca
Remove include which was not needed
...
R=whesse@google.com
BUG=
Review URL: https://codereview.chromium.org//14629002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@22171 260f80e4-7a28-3924-810f-c04153c831b5
2013-04-30 10:18:34 +00:00
asiva@google.com
9d123e5366
Move hashmap.h and hashmap.cc from the 'bin' directory to 'platform' directory so that it can be used from VM code too.
...
Review URL: https://chromiumcodereview.appspot.com//10853009
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10261 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-03 22:11:30 +00:00