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

Issue 1414453017: Allocator shims working on VS2015. (Closed)

Created:
5 years, 1 month ago by Will Harris
Modified:
4 years, 8 months ago
CC:
chromium-reviews, wfh+watch_chromium.org, Dai Mikurube (NOT FULLTIME), vmpstr+watch_chromium.org, Primiano Tucci (use gerrit)
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Allocator shims working on VS2015. VS2015 is happy for us to simply override the CRT symbols since they seem to be defined weakly by the universal CRT. This shim is far simpler than the previous one, as the libcmt stripping technique can be removed. Allocator shim is also now only be enabled on Release Static builds. BUG=481611 TEST=base_unittests --gtest_filter=*Memory* in all configurations (Debug/Release/Static/Component/GN/gyp/x64/x86) CQ_INCLUDE_TRYBOTS=tryserver.chromium.win:win_optional_gpu_tests_rel;tryserver.chromium.mac:mac_optional_gpu_tests_rel Committed: https://crrev.com/e20c2e0ab4e5b796e7a1890fb9048b5eb307d015 Cr-Commit-Position: refs/heads/master@{#383810} Committed: https://crrev.com/08a9665ab0bce3813425f8d7ec9bec9178d5faa4 Cr-Commit-Position: refs/heads/master@{#384711}

Patch Set 1 #

Patch Set 2 : rebase and fix up #

Patch Set 3 : fix IsAllocatorInitialized #

Patch Set 4 : fix gn #

Patch Set 5 : fix gn. remove some unneeded crt overrides. add aligned mem test. #

Patch Set 6 : linux fix #

Patch Set 7 : gles2_conform_support should not directly depend on allocator since it does so via egl_native->base #

Patch Set 8 : rebase after crrev.com/1835433002 #

Total comments: 13

Patch Set 9 : code review comments. add more aligned tests #

Total comments: 8

Patch Set 10 : no aligned_realloc in POSIX #

Patch Set 11 : remove unused generic_cpp_alloc #

Patch Set 12 : rebase #

Unified diffs Side-by-side diffs Delta from patch set Stats (+128 lines, -386 lines) Patch
M base/allocator/BUILD.gn View 1 2 3 4 5 6 7 8 4 chunks +15 lines, -48 lines 0 comments Download
M base/allocator/allocator.gyp View 1 2 2 chunks +1 line, -40 lines 0 comments Download
M base/allocator/allocator_check.cc View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +5 lines, -7 lines 0 comments Download
A base/allocator/allocator_shim_win.h View 1 2 1 chunk +17 lines, -0 lines 0 comments Download
M base/allocator/allocator_shim_win.cc View 1 2 3 4 5 6 7 8 9 10 11 6 chunks +42 lines, -191 lines 0 comments Download
D base/allocator/prep_libc.py View 1 1 chunk +0 lines, -84 lines 0 comments Download
M base/process/memory_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 4 chunks +40 lines, -0 lines 0 comments Download
M build/common.gypi View 1 2 3 4 5 6 7 8 9 10 11 4 chunks +8 lines, -15 lines 0 comments Download
M gpu/gles2_conform_support/gles2_conform_support.gyp View 1 2 3 4 5 6 1 chunk +0 lines, -1 line 0 comments Download

Messages

Total messages: 59 (29 generated)
Will Harris
PTAL. This does work... no smoke and mirrors. :)
4 years, 9 months ago (2016-03-27 06:32:46 UTC) #10
brucedawson
https://codereview.chromium.org/1414453017/diff/140001/base/allocator/allocator_shim_win.cc File base/allocator/allocator_shim_win.cc (right): https://codereview.chromium.org/1414453017/diff/140001/base/allocator/allocator_shim_win.cc#newcode26 base/allocator/allocator_shim_win.cc:26: // See definitions of original functions in ucrt\ucrt_malloc.h Do ...
4 years, 8 months ago (2016-03-28 20:38:18 UTC) #13
Nico
+rnk since he did something similar (but in a different way) in http://reviews.llvm.org/D18413 Is there ...
4 years, 8 months ago (2016-03-28 20:45:48 UTC) #15
Reid Kleckner
On 2016/03/28 20:45:48, Nico wrote: > +rnk since he did something similar (but in a ...
4 years, 8 months ago (2016-03-28 21:06:24 UTC) #16
Will Harris
On 2016/03/28 21:06:24, Reid Kleckner wrote: > On 2016/03/28 20:45:48, Nico wrote: > > +rnk ...
4 years, 8 months ago (2016-03-28 21:12:13 UTC) #17
Will Harris
On 2016/03/28 20:38:18, brucedawson wrote: > https://codereview.chromium.org/1414453017/diff/140001/base/allocator/allocator_shim_win.cc > File base/allocator/allocator_shim_win.cc (right): > > https://codereview.chromium.org/1414453017/diff/140001/base/allocator/allocator_shim_win.cc#newcode26 > ...
4 years, 8 months ago (2016-03-28 21:17:40 UTC) #18
Nico
Ok, sounds good. LGTM, let's see how it does :-)
4 years, 8 months ago (2016-03-28 21:20:54 UTC) #19
Will Harris
+piman for gpu/ owners while I fix the nits. I might add a test for ...
4 years, 8 months ago (2016-03-28 21:26:32 UTC) #22
piman
lgtm
4 years, 8 months ago (2016-03-28 23:32:52 UTC) #23
Will Harris
all changes made. https://codereview.chromium.org/1414453017/diff/140001/base/allocator/BUILD.gn File base/allocator/BUILD.gn (right): https://codereview.chromium.org/1414453017/diff/140001/base/allocator/BUILD.gn#newcode27 base/allocator/BUILD.gn:27: if (is_win && !is_component_build && !is_debug) ...
4 years, 8 months ago (2016-03-29 18:23:52 UTC) #24
brucedawson
lgtm
4 years, 8 months ago (2016-03-29 18:31:50 UTC) #25
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1414453017/160001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1414453017/160001
4 years, 8 months ago (2016-03-29 18:32:53 UTC) #28
commit-bot: I haz the power
Try jobs failed on following builders: mac_chromium_rel_ng on tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/mac_chromium_rel_ng/builds/201754)
4 years, 8 months ago (2016-03-29 18:35:24 UTC) #30
Primiano Tucci (use gerrit)
I'll like to see this integrated in the unified allocator shim one day, but that's ...
4 years, 8 months ago (2016-03-29 18:46:07 UTC) #32
brucedawson
https://codereview.chromium.org/1414453017/diff/140001/base/allocator/allocator_shim_win.cc File base/allocator/allocator_shim_win.cc (right): https://codereview.chromium.org/1414453017/diff/140001/base/allocator/allocator_shim_win.cc#newcode177 base/allocator/allocator_shim_win.cc:177: memset(result, 0, size); I don't think we can use ...
4 years, 8 months ago (2016-03-29 18:51:25 UTC) #33
Will Harris
thanks for review - just in time :) https://codereview.chromium.org/1414453017/diff/140001/base/allocator/allocator_shim_win.cc File base/allocator/allocator_shim_win.cc (left): https://codereview.chromium.org/1414453017/diff/140001/base/allocator/allocator_shim_win.cc#oldcode121 base/allocator/allocator_shim_win.cc:121: return ...
4 years, 8 months ago (2016-03-29 18:56:21 UTC) #34
Primiano Tucci (use gerrit)
Thanks! LGTM https://codereview.chromium.org/1414453017/diff/140001/base/allocator/allocator_shim_win.cc File base/allocator/allocator_shim_win.cc (right): https://codereview.chromium.org/1414453017/diff/140001/base/allocator/allocator_shim_win.cc#newcode177 base/allocator/allocator_shim_win.cc:177: memset(result, 0, size); On 2016/03/29 18:56:20, Will ...
4 years, 8 months ago (2016-03-29 19:30:03 UTC) #35
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1414453017/200001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1414453017/200001
4 years, 8 months ago (2016-03-29 19:32:44 UTC) #38
commit-bot: I haz the power
Committed patchset #11 (id:200001)
4 years, 8 months ago (2016-03-29 20:46:36 UTC) #40
commit-bot: I haz the power
Patchset 11 (id:??) landed as https://crrev.com/e20c2e0ab4e5b796e7a1890fb9048b5eb307d015 Cr-Commit-Position: refs/heads/master@{#383810}
4 years, 8 months ago (2016-03-29 20:48:18 UTC) #42
Sorin Jianu
A revert of this CL (patchset #11 id:200001) has been created in https://codereview.chromium.org/1839783005/ by sorin@chromium.org. ...
4 years, 8 months ago (2016-03-29 22:29:13 UTC) #43
Will Harris
The two known issues have been fixed in other CLs: 1. Link issue on Windows ...
4 years, 8 months ago (2016-03-31 18:28:28 UTC) #45
brucedawson
On 2016/03/31 18:28:28, Will Harris wrote: > The two known issues have been fixed in ...
4 years, 8 months ago (2016-03-31 18:32:36 UTC) #46
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1414453017/220001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1414453017/220001
4 years, 8 months ago (2016-04-01 18:22:59 UTC) #49
commit-bot: I haz the power
Try jobs failed on following builders: win_chromium_x64_rel_ng on tryserver.chromium.win (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_x64_rel_ng/builds/191018)
4 years, 8 months ago (2016-04-01 18:35:15 UTC) #51
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1414453017/220001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1414453017/220001
4 years, 8 months ago (2016-04-01 20:18:22 UTC) #53
Will Harris
win_chromium_x64_rel_ng is a suspected flake see crbug.com/599955
4 years, 8 months ago (2016-04-01 20:18:58 UTC) #54
commit-bot: I haz the power
Committed patchset #12 (id:220001)
4 years, 8 months ago (2016-04-01 22:36:40 UTC) #56
commit-bot: I haz the power
Patchset 12 (id:??) landed as https://crrev.com/08a9665ab0bce3813425f8d7ec9bec9178d5faa4 Cr-Commit-Position: refs/heads/master@{#384711}
4 years, 8 months ago (2016-04-01 22:38:58 UTC) #58
Yuki
4 years, 5 months ago (2016-07-08 04:51:39 UTC) #59
Message was sent while issue was closed.
A revert of this CL (patchset #12 id:220001) has been created in
https://codereview.chromium.org/2132963002/ by yukishiino@chromium.org.

The reason for reverting is: We're seeing probably the same or similar issue
when linking on win again.

https://build.chromium.org/p/chromium/builders/Win/builds/45048

FAILED: blacklist_test_main_dll.dll blacklist_test_main_dll.dll.lib
blacklist_test_main_dll.dll.pdb 
C:\b\depot_tools\python276_bin\python.exe gyp-win-tool link-with-manifests
environment.x86 True blacklist_test_main_dll.dll
"C:\b\depot_tools\python276_bin\python.exe gyp-win-tool link-wrapper
environment.x86 False link.exe /nologo /IMPLIB:blacklist_test_main_dll.dll.lib
/DLL /OUT:blacklist_test_main_dll.dll @blacklist_test_main_dll.dll.rsp" 2 mt.exe
rc.exe
"obj\chrome_elf\blacklist_test_main_dll.blacklist_test_main_dll.dll.intermediate.manifest"
obj\chrome_elf\blacklist_test_main_dll.blacklist_test_main_dll.dll.generated.manifest
allocator.lib(allocator.allocator_shim_win.obj) : error LNK2005:
__query_new_mode already defined in libucrt.lib(new_mode.obj)
allocator.lib(allocator.allocator_shim_win.obj) : error LNK2005: __set_new_mode
already defined in libucrt.lib(new_mode.obj)
allocator.lib(allocator.allocator_shim_win.obj) : error LNK2005: _calloc already
defined in libucrt.lib(calloc.obj)
allocator.lib(allocator.allocator_shim_win.obj) : error LNK2005: _free already
defined in libucrt.lib(free.obj)
allocator.lib(allocator.allocator_shim_win.obj) : error LNK2005: _malloc already
defined in libucrt.lib(malloc.obj)
blacklist_test_main_dll.dll : fatal error LNK1169: one or more multiply defined
symbols found

Let me revert this CL to see if the revert fixes the build breakage..

Powered by Google App Engine
This is Rietveld 408576698