diff options
author | sebmarchand@chromium.org <sebmarchand@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-02-20 13:19:10 +0000 |
---|---|---|
committer | sebmarchand@chromium.org <sebmarchand@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-02-20 13:19:10 +0000 |
commit | 29bbcf4db6b9591d606b04eb4b3bafccb945179d (patch) | |
tree | 50dacc43f4457fbea2850caf197f440f4e87c893 /sandbox | |
parent | 0fa2c84943eaa8e1c99c831192094dc6565bc36f (diff) | |
download | chromium_src-29bbcf4db6b9591d606b04eb4b3bafccb945179d.zip chromium_src-29bbcf4db6b9591d606b04eb4b3bafccb945179d.tar.gz chromium_src-29bbcf4db6b9591d606b04eb4b3bafccb945179d.tar.bz2 |
Fix a compilation issue when building with VS2013 and optimization set to "max".
For some reasons (I'm still trying to find them) those 2 DCHECKs make the link step to fail when building nacl64.exe (and maybe some other target) with VS2013 and optimization set to 'max'
Here's the error that I get:
[1537/6627] LINK_EMBED nacl64.exe
FAILED: D:\src\depot_tools\python276_bin\python.exe gyp-win-tool link-with-manifests environment.x64 True nacl64.exe "D:\src\depot_tools\python276_bin\python.exe gyp-win-tool link-wrapper environment.x64 False link.exe /nologo /OUT:nacl64.exe @nacl64
.exe.rsp" 1 mt.exe rc.exe "obj\chrome\chrome_nacl_win64.nacl64.exe.intermediate.manifest" obj\chrome\chrome_nacl_win64.nacl64.exe.generated.manifest ..\..\build\win\compatibility.manifest
LibDef: Total time = 0.015s
OptRef: Total time = 0.000s
Generating code
d:\src\chrome\src\sandbox\win\src\sharedmem_ipc_client.cc(34) : fatal error C1001: An internal error has occurred in the compiler.
(compiler file 'f:\dd\vctools\compiler\utc\src\p2\main.c', line 227)
To work around this problem, try simplifying or changing the program near the locations listed above.
Please choose the Technical Support command on the Visual C++
Help menu, or open the Technical Support help file for more information
INTERNAL COMPILER ERROR in 'C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\BIN\amd64\link.exe'
Please choose the Technical Support command on the Visual C++
Help menu, or open the Technical Support help file for more information
Final: Total time = 27.940s
Traceback (most recent call last):
File "gyp-win-tool", line 293, in <module>
sys.exit(main(sys.argv[1:]))
File "gyp-win-tool", line 28, in main
exit_code = executor.Dispatch(args)
File "gyp-win-tool", line 70, in Dispatch
return getattr(self, method)(*args[1:])
File "gyp-win-tool", line 158, in ExecLinkWithManifests
subprocess.check_call(ldcmd + add_to_ld)
File "D:\src\depot_tools\python276_bin\lib\subprocess.py", line 540, in check_call
raise CalledProcessError(retcode, cmd)
This CL fix this, for the first dcheck it might be because we're comparing a LONG to a ChannelState (and the linker he's unhappy when looking for the conversion routine), but for the second one I have really no idea what's happening, all I know is that using DCHECK_LE instead of DCHECK shouldn't change anything here, and that it fix the build.
R=cpu@chromium.org
CC=scottmg@chromium.org
BUG=344980
Review URL: https://codereview.chromium.org/172853002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@252213 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'sandbox')
-rw-r--r-- | sandbox/win/src/sharedmem_ipc_client.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sandbox/win/src/sharedmem_ipc_client.cc b/sandbox/win/src/sharedmem_ipc_client.cc index a9eb01f..9d37bbd 100644 --- a/sandbox/win/src/sharedmem_ipc_client.cc +++ b/sandbox/win/src/sharedmem_ipc_client.cc @@ -31,7 +31,7 @@ void SharedMemIPCClient::FreeBuffer(void* buffer) { size_t num = ChannelIndexFromBuffer(buffer); ChannelControl* channel = control_->channels; LONG result = ::InterlockedExchange(&channel[num].state, kFreeChannel); - DCHECK(kFreeChannel != result); + DCHECK_NE(kFreeChannel, static_cast<ChannelState>(result)); result; } @@ -145,7 +145,7 @@ size_t SharedMemIPCClient::LockFreeChannel(bool* severe_failure) { size_t SharedMemIPCClient::ChannelIndexFromBuffer(const void* buffer) { ptrdiff_t d = reinterpret_cast<const char*>(buffer) - first_base_; size_t num = d/kIPCChannelSize; - DCHECK(num < control_->channels_count); + DCHECK_LT(num, control_->channels_count); return (num); } |