Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(160)

Issue 1781883002: Fixes some memory leaks in //runtime/bin (Closed)

Created:
4 years, 9 months ago by zra
Modified:
4 years, 9 months ago
Reviewers:
siva, Ivan Posva
CC:
reviews_dartlang.org, vm-dev_dartlang.org
Base URL:
git@github.com:dart-lang/sdk.git@master
Target Ref:
refs/heads/master
Visibility:
Public.

Description

Fixes some memory leaks in //runtime/bin Also some style cleanups. Decided to fix these leaks by using Dart_ScopeAllocate instead of malloc and new. Leaks are noted in the CL. I haven't finished looking over all the code in //runtime/bin yet, but this CL was getting big. Committed: https://github.com/dart-lang/sdk/commit/c75a817ee0f307f50ffbe5f9e64653173d1e26ef

Patch Set 1 #

Patch Set 2 : Mac fixes #

Patch Set 3 : Some windows fixes #

Patch Set 4 : Windows issues #

Patch Set 5 : Fix build #

Patch Set 6 : Cleanup #

Patch Set 7 : Fix PathBuffer #

Patch Set 8 : Fix Android build #

Patch Set 9 : Cleanup #

Total comments: 4

Patch Set 10 : Comments. Fix leak in Process_Start #

Total comments: 5

Patch Set 11 : Cleanup #

Total comments: 6

Patch Set 12 : Address comments #

Patch Set 13 : Fix tests on Windows #

Unified diffs Side-by-side diffs Delta from patch set Stats (+919 lines, -639 lines) Patch
M runtime/bin/crypto.h View 1 2 3 4 5 6 7 8 1 chunk +0 lines, -1 line 0 comments Download
M runtime/bin/crypto.cc View 1 2 3 4 5 6 7 8 2 chunks +1 line, -5 lines 0 comments Download
M runtime/bin/crypto_android.cc View 1 2 3 4 5 6 7 8 2 chunks +3 lines, -3 lines 0 comments Download
M runtime/bin/crypto_linux.cc View 1 2 3 4 5 6 7 8 2 chunks +3 lines, -2 lines 0 comments Download
M runtime/bin/crypto_macos.cc View 1 2 3 4 5 6 7 8 1 chunk +0 lines, -1 line 0 comments Download
M runtime/bin/crypto_win.cc View 1 2 3 4 5 6 7 8 1 chunk +0 lines, -1 line 0 comments Download
M runtime/bin/dartutils.h View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +17 lines, -0 lines 0 comments Download
M runtime/bin/dartutils.cc View 1 2 3 4 5 2 chunks +2 lines, -3 lines 0 comments Download
M runtime/bin/directory.h View 1 2 3 4 5 6 7 8 9 10 11 8 chunks +32 lines, -24 lines 0 comments Download
M runtime/bin/directory.cc View 1 2 3 4 5 6 7 8 9 14 chunks +32 lines, -25 lines 0 comments Download
M runtime/bin/directory_android.cc View 1 2 3 4 5 6 7 8 9 10 11 16 chunks +80 lines, -48 lines 0 comments Download
M runtime/bin/directory_linux.cc View 1 2 3 4 5 6 7 8 9 10 11 16 chunks +96 lines, -63 lines 0 comments Download
M runtime/bin/directory_macos.cc View 1 2 3 4 5 6 7 8 9 10 11 16 chunks +88 lines, -52 lines 0 comments Download
M runtime/bin/directory_win.cc View 1 2 3 4 5 6 7 8 9 10 11 21 chunks +92 lines, -52 lines 0 comments Download
M runtime/bin/fdutils_android.cc View 1 chunk +0 lines, -1 line 0 comments Download
M runtime/bin/file.h View 1 2 3 4 5 4 chunks +8 lines, -4 lines 0 comments Download
M runtime/bin/file.cc View 1 2 3 4 5 45 chunks +74 lines, -65 lines 0 comments Download
M runtime/bin/file_android.cc View 1 2 3 4 5 6 7 8 9 chunks +59 lines, -31 lines 0 comments Download
M runtime/bin/file_linux.cc View 1 2 3 4 5 6 7 8 12 chunks +58 lines, -26 lines 0 comments Download
M runtime/bin/file_macos.cc View 1 2 3 4 5 6 7 8 10 chunks +59 lines, -29 lines 0 comments Download
M runtime/bin/file_system_watcher_win.cc View 3 chunks +1 line, -3 lines 0 comments Download
M runtime/bin/file_test.cc View 1 2 3 6 7 8 9 10 11 12 3 chunks +3 lines, -3 lines 0 comments Download
M runtime/bin/file_win.cc View 1 2 3 4 5 34 chunks +53 lines, -58 lines 0 comments Download
M runtime/bin/main.cc View 1 2 3 4 5 1 chunk +3 lines, -1 line 0 comments Download
M runtime/bin/platform.h View 1 chunk +4 lines, -6 lines 0 comments Download
M runtime/bin/platform.cc View 1 chunk +0 lines, -4 lines 0 comments Download
M runtime/bin/platform_android.cc View 1 2 3 4 5 6 7 8 3 chunks +7 lines, -9 lines 0 comments Download
M runtime/bin/platform_linux.cc View 1 2 3 4 5 6 7 8 3 chunks +7 lines, -9 lines 0 comments Download
M runtime/bin/platform_macos.cc View 1 2 3 4 5 6 7 8 2 chunks +10 lines, -14 lines 0 comments Download
M runtime/bin/platform_win.cc View 1 2 3 4 5 6 7 8 4 chunks +19 lines, -19 lines 0 comments Download
M runtime/bin/process.cc View 1 2 3 4 5 6 7 8 9 10 9 chunks +19 lines, -25 lines 0 comments Download
M runtime/bin/process_android.cc View 4 chunks +7 lines, -4 lines 0 comments Download
M runtime/bin/process_linux.cc View 4 chunks +8 lines, -4 lines 0 comments Download
M runtime/bin/process_macos.cc View 6 chunks +13 lines, -6 lines 0 comments Download
M runtime/bin/process_win.cc View 1 2 3 4 5 6 7 8 9 5 chunks +7 lines, -12 lines 0 comments Download
M runtime/bin/socket.h View 1 chunk +0 lines, -1 line 0 comments Download
M runtime/bin/socket_android.cc View 1 2 3 4 5 6 2 chunks +3 lines, -3 lines 0 comments Download
M runtime/bin/socket_linux.cc View 1 2 3 4 5 6 3 chunks +5 lines, -3 lines 0 comments Download
M runtime/bin/socket_macos.cc View 1 2 3 4 5 6 3 chunks +5 lines, -4 lines 0 comments Download
M runtime/bin/socket_win.cc View 1 2 3 4 5 6 2 chunks +3 lines, -3 lines 0 comments Download
M runtime/bin/utils_win.h View 1 2 3 4 5 1 chunk +5 lines, -0 lines 0 comments Download
M runtime/bin/utils_win.cc View 1 2 12 chunks +33 lines, -12 lines 0 comments Download

Messages

Total messages: 8 (4 generated)
zra
https://codereview.chromium.org/1781883002/diff/160001/runtime/bin/directory_win.cc File runtime/bin/directory_win.cc (left): https://codereview.chromium.org/1781883002/diff/160001/runtime/bin/directory_win.cc#oldcode467 runtime/bin/directory_win.cc:467: if (exists != EXISTS) return false; leaked system_path and ...
4 years, 9 months ago (2016-03-11 23:55:51 UTC) #4
Ivan Posva
LGTMwC -ip https://codereview.chromium.org/1781883002/diff/200001/runtime/bin/dartutils.h File runtime/bin/dartutils.h (right): https://codereview.chromium.org/1781883002/diff/200001/runtime/bin/dartutils.h#newcode180 runtime/bin/dartutils.h:180: strncpy(result, str, str_len); Could you use memcpy ...
4 years, 9 months ago (2016-03-13 20:59:19 UTC) #5
zra
https://codereview.chromium.org/1781883002/diff/200001/runtime/bin/dartutils.h File runtime/bin/dartutils.h (right): https://codereview.chromium.org/1781883002/diff/200001/runtime/bin/dartutils.h#newcode180 runtime/bin/dartutils.h:180: strncpy(result, str, str_len); On 2016/03/13 20:59:18, Ivan Posva wrote: ...
4 years, 9 months ago (2016-03-14 18:07:52 UTC) #6
zra
4 years, 9 months ago (2016-03-14 18:08:56 UTC) #8
Message was sent while issue was closed.
Committed patchset #13 (id:240001) manually as
c75a817ee0f307f50ffbe5f9e64653173d1e26ef (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698