New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 666994 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Closed: Nov 2016
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug

Blocking:
issue 82385



Sign in to add a comment

LLD buildbot red due to MS inline asm symbol redefinition

Project Member Reported by r...@chromium.org, Nov 19 2016

Issue description

FAILED: frame_editor.exe frame_editor.exe.pdb 
C:/b/depot_tools/python276_bin/python.exe ../../build/toolchain/win/tool_wrapper.py link-wrapper environment.x86 False ../../third_party/llvm-build/Release+Asserts/bin/lld-link.exe /nologo /OUT:./frame_editor.exe /PDB:./frame_editor.exe.pdb @./frame_editor.exe.rsp
<inline asm>:7:2: error: invalid symbol redefinition
        L__MSASMLABEL_.0__wloop:

It looks like this bot is using LTO now. MS inline asm labels are currently generated in the frontend and they're supposed to be unique across the entire TU. Obviously this is a problem when you go to LTO things and you use the same label in two TUs.

Last green build was https://build.chromium.org/p/chromium.fyi/builders/CrWinClangLLD/builds/4771, Nov 11.
 

Comment 1 by r...@chromium.org, Nov 23 2016

Cc: kjellander@chromium.org
 Issue 668203  has been merged into this issue.

Comment 2 by r...@chromium.org, Nov 23 2016

The multiple wloop labels are probably coming from libyuv:
https://cs.chromium.org/search/?q=wloop:&sq=package:chromium&type=cs

We could do a source-level workaround of giving them unique names, but that's quite a hack. MS inline asm labels are supposed to be function-local, and Clang goes out of its way to add that "__MSASMLABEL_.0" prefix.

Comment 3 by thakis@chromium.org, Nov 23 2016

Blocking: 82385
Components: Build
Labels: clang
Ah, only on that bot due to LTO, thanks.

Comment 4 by r...@chromium.org, Nov 23 2016

This upstream bug has some discussion about how we ended up here:
https://llvm.org/bugs/show_bug.cgi?id=23715

We should be using the GCC inline as '%=' feature which translates into '{:uid}' in LLVM inline asm. This makes it so that you get a unique label in each asm blob.
Cc: fbarchard@chromium.org

Comment 6 by thakis@chromium.org, Nov 23 2016

fbarchard: nothing for you to do here, this happens only in an experimental setting (lto) on an doubly-experimental bot (clang-cl with link-lld)
We don't use frame_editor in Chromium, so we could easily make it so that it's excluded from Chromium builds. Would that be the easiest way?

Comment 8 by thakis@chromium.org, Nov 23 2016

nothing to do here except for us folks working on the toolchain :-)

Comment 9 by r...@chromium.org, Nov 28 2016

Owner: r...@chromium.org
Clang r288059 should turn that bot green, let's wait and see if it really does.

Comment 10 by r...@chromium.org, Nov 29 2016

OK, that one didn't go so well:

C:\b\c\b\ClangToTWin\src\sandbox\win\src\sidestep_resolver.cc(153,3):  error: unexpected token in argument list
  __asm {
  ^
<inline asm>(16,20):  note: instantiated into assembly here
        jz L__MSASMLABEL_.{:uid}__call_interceptor

Let's try again with clang r288093.
Status: Fixed (was: Untriaged)
https://build.chromium.org/p/chromium.fyi/builders/CrWinClangLLD green \o/
https://build.chromium.org/p/chromium.fyi/stats/CrWinClangLLD

I guess the doubling of build time on that bot is due to it now using PGO. Hrm :-/
lld.png
33.8 KB View Download
Err, LTO, not PGO.

Comment 14 by h...@chromium.org, Nov 30 2016

Yes, it's not fast.. but it's successfully building "all" without falling over, so we have that going for us.

MSVC's LTO builds are also slow, so I'm not too concerned about our speed right now.

Sign in to add a comment