New issue
Advanced search Search tips

Issue 677837 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Jan 2017
Cc:
EstimatedDays: ----
NextAction: ----
OS: Windows
Pri: 3
Type: Bug



Sign in to add a comment

PGO build failing on spirv-tools-angle

Project Member Reported by scottmg@chromium.org, Jan 2 2017

Issue description

This is affecting x86 and x64. I didn't look back to see when it started, but I guess likely for a while. I'll take a look if no one else is looking at it yet.

https://build.chromium.org/p/chromium.fyi/builders/Chromium%20Win%20x64%20PGO%20Builder/builds/17166/steps/Compile%3A%20Instrumentation%20phase./logs/stdio

FAILED: VkLayer_core_validation.dll VkLayer_core_validation.dll.lib VkLayer_core_validation.dll.pdb 
C:/b/depot_tools/python276_bin/python.exe ../../build/toolchain/win/tool_wrapper.py link-wrapper environment.x64 False link.exe /nologo /IMPLIB:./VkLayer_core_validation.dll.lib /DLL /OUT:./VkLayer_core_validation.dll /PDB:./VkLayer_core_validation.dll.pdb @./VkLayer_core_validation.dll.rsp
c:\b\build\slave\chromium-win-x64-pgo-builder\build\src\third_party\spirv-tools-angle\src\source\table.cpp(44) : error C2220: warning treated as error - no 'executable' file generated

c:\b\build\slave\chromium-win-x64-pgo-builder\build\src\third_party\spirv-tools-angle\src\source\table.cpp(44) : warning C4701: potentially uninitialized local variable 'opcode_table' used

c:\b\build\slave\chromium-win-x64-pgo-builder\build\src\third_party\spirv-tools-angle\src\source\table.cpp(44) : warning C4703: potentially uninitialized local pointer variable 'opcode_table' used

c:\b\build\slave\chromium-win-x64-pgo-builder\build\src\third_party\spirv-tools-angle\src\source\table.cpp(44) : warning C4701: potentially uninitialized local variable 'operand_table' used

c:\b\build\slave\chromium-win-x64-pgo-builder\build\src\third_party\spirv-tools-angle\src\source\table.cpp(44) : warning C4703: potentially uninitialized local pointer variable 'operand_table' used

c:\b\build\slave\chromium-win-x64-pgo-builder\build\src\third_party\spirv-tools-angle\src\source\table.cpp(44) : warning C4701: potentially uninitialized local variable 'ext_inst_table' used

c:\b\build\slave\chromium-win-x64-pgo-builder\build\src\third_party\spirv-tools-angle\src\source\table.cpp(44) : warning C4703: potentially uninitialized local pointer variable 'ext_inst_table' used

LINK : fatal error LNK1257: code generation failed

 
Cc: jmad...@chromium.org
FTR, here's a quick-ish repro:

[61be4cf...]c:\src\cr\src>gn gen out/pgo --args="chrome_pgo_phase=1 is_debug=false is_official_build=true"
Done. Made 5710 targets from 1231 files in 2743ms

[61be4cf...]c:\src\cr\src>ninja -C out\pgo VkLayer_core_validation.dll
ninja: Entering directory `out\pgo'
[0->61/61 ~1] LINK(DLL) VkLayer_core_validation.dll VkLayer_core_validation.dll.lib VkLayer_core_validation.dll.pdb
FAILED: VkLayer_core_validation.dll VkLayer_core_validation.dll.lib VkLayer_core_validation.dll.pdb
c:/src/depot_tools/python276_bin/python.exe ../../build/toolchain/win/tool_wrapper.py link-wrapper environment.x64 False link.exe /nologo /IMPLIB:./VkLayer_core_validation.dll.lib /DLL /OUT:./VkLayer_core_validation.dll /PDB:./VkLayer_core_validation.dll.pdb @./VkLayer_core_validation.dll.rsp
c:\src\cr\src\third_party\spirv-tools-angle\src\source\table.cpp(44) : error C2220: warning treated as error - no 'executable' file generated
c:\src\cr\src\third_party\spirv-tools-angle\src\source\table.cpp(44) : warning C4701: potentially uninitialized local variable 'opcode_table' used
c:\src\cr\src\third_party\spirv-tools-angle\src\source\table.cpp(44) : warning C4703: potentially uninitialized local pointer variable 'opcode_table' used
c:\src\cr\src\third_party\spirv-tools-angle\src\source\table.cpp(44) : warning C4701: potentially uninitialized local variable 'operand_table' used
c:\src\cr\src\third_party\spirv-tools-angle\src\source\table.cpp(44) : warning C4703: potentially uninitialized local pointer variable 'operand_table' used
c:\src\cr\src\third_party\spirv-tools-angle\src\source\table.cpp(44) : warning C4701: potentially uninitialized local variable 'ext_inst_table' used
c:\src\cr\src\third_party\spirv-tools-angle\src\source\table.cpp(44) : warning C4703: potentially uninitialized local pointer variable 'ext_inst_table' used
LINK : fatal error LNK1257: code generation failed
ninja: build stopped: subcommand failed.

... Oh, actually, it just started at https://build.chromium.org/p/chromium.fyi/builders/Chromium%20Win%20x64%20PGO%20Builder/builds/17165 due to https://codereview.chromium.org/2611553002.

Can we disable these warnings for spirv-tools for now? I can look at upstreaming fixes, but this code is never used by our users, just on the bots and for ANGLE developers.
I was going to just suppress the warnings, but it seems like the warning is strictly correct (?) in that the only thing guarding a non-initialized pointer is the assert(0 && "blah") in the functions that are to be initializing the pointers.

So maybe it'd be better to have spvContextCreate() check return values.
Oops, comment collision. Yeah, I can disable the warnings for now.
Cool, thanks, was looking at it too. Feel free to upload a CL to the ANGLE tracker and I'll commit and roll.

Comment 6 Deleted

FYI the only work is to add /wd4701 and /wd4703 to spirv_tools_config in third_party/angle/src/vulkan_support/BUILD.gn.
Project Member

Comment 9 by bugdroid1@chromium.org, Jan 2 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/angle/angle/+/38ef7c8c97d1e28cb52816eedb823438c3057cee

commit 38ef7c8c97d1e28cb52816eedb823438c3057cee
Author: Scott Graham <scottmg@chromium.org>
Date: Mon Jan 02 20:19:18 2017

Disable 4701 and 4703 for spirv_tools for Windows PGO build

BUG= chromium:677837 

Change-Id: I5165ba9086a3d74fde7e7718909e242588f3c1de
Reviewed-on: https://chromium-review.googlesource.com/424374
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>

[modify] https://crrev.com/38ef7c8c97d1e28cb52816eedb823438c3057cee/src/vulkan_support/BUILD.gn

Project Member

Comment 10 by bugdroid1@chromium.org, Jan 2 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/106ba1c4398db3fa56cc86cec2e7b3701bb84e93

commit 106ba1c4398db3fa56cc86cec2e7b3701bb84e93
Author: jmadill <jmadill@chromium.org>
Date: Mon Jan 02 23:50:43 2017

Roll ANGLE 4d0bf55..38ef7c8

https://chromium.googlesource.com/angle/angle.git/+log/4d0bf55..38ef7c8

BUG= chromium:677837 

TBR=scottmg@chromium.org

TEST=bots

CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.win:win_optional_gpu_tests_rel;master.tryserver.chromium.mac:mac_optional_gpu_tests_rel;master.tryserver.chromium.linux:linux_optional_gpu_tests_rel;master.tryserver.chromium.android:android_optional_gpu_tests_rel

Review-Url: https://codereview.chromium.org/2603283002
Cr-Commit-Position: refs/heads/master@{#441080}

[modify] https://crrev.com/106ba1c4398db3fa56cc86cec2e7b3701bb84e93/DEPS

Should we close this bug or do we want to get a "better" fix? (not a workaround)
Status: Fixed (was: Assigned)
If these warnings were detectable on the bots, I would be happy to fix them upstream and life the suppressions. But seeing as they only break something that someone has to manually file issues for after the changes are rolled in, it's a little too dangerous for me, and seeing as the code is test-only, I think we should just move on.
Sorry, detectable on the CQ, this is obviously a bot. And s/life/lift.

Sign in to add a comment