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

Issue metadata

Status: Available
Owner: ----
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Windows
Pri: 1
Type: Bug

Blocking:
issue 636111
issue 82385



Sign in to add a comment

Clang goma for win deletes "#ifndef NDEBUG" functions for debug in webkit_unit_tests.

Project Member Reported by yoichio@chromium.org, Aug 7 2017

Issue description

#gn args ./
is_component_build = true
is_debug = true
is_clang = true
use_goma = true
is_win_fastlink = true
# use_lld = true
enable_nacl = false
target_cpu = "x86"

It misses Node::ShowTreeForThisAcrossFrame() or so.
I can't debug.

 

Comment 1 by h...@chromium.org, Aug 7 2017

Status: Available (was: Untriaged)
Can you provide more details about the problem?

Node::ShowTreeForThisAcrossFrame() does get emitted:

> type out\debug\args.gn
# Build arguments go here.
# See "gn args <out_dir> --list" for available build arguments.
is_component_build = true
is_debug = true
is_clang = true
use_goma = true
is_win_fastlink = true
# use_lld = true
enable_nacl = false
target_cpu = "x86"

>ninja -j250 -C out\debug obj/third_party/WebKit/Source/core/dom/dom/Node.obj
...

>dumpbin /disasm out\debug\obj\third_party\WebKit\source\core\dom\dom\node.obj | grep -A20 ShowTreeForThisAcrossFrame
?ShowTreeForThisAcrossFrame@Node@blink@@QBEXXZ (public: void __thiscall blink::Node::ShowTreeForThisAcrossFrame(void)const ):
  00000000: 55                 push        ebp
  00000001: 89 E5              mov         ebp,esp
  00000003: 53                 push        ebx
  00000004: 57                 push        edi
  00000005: 56                 push        esi
  00000006: 83 E4 F8           and         esp,0FFFFFFF8h
  00000009: 81 EC F8 01 00 00  sub         esp,1F8h
  0000000F: A1 00 00 00 00     mov         eax,dword ptr [___security_cookie]
  00000014: 89 84 24 F0 01 00  mov         dword ptr [esp+1F0h],eax
            00
  0000001B: 89 4C 24 64        mov         dword ptr [esp+64h],ecx
  0000001F: 8B 44 24 64        mov         eax,dword ptr [esp+64h]
  00000023: 89 44 24 60        mov         dword ptr [esp+60h],eax
  00000027: 89 44 24 58        mov         dword ptr [esp+58h],eax
  0000002B: 8B 44 24 60        mov         eax,dword ptr [esp+60h]
  0000002F: 89 04 24           mov         dword ptr [esp],eax
  00000032: E8 00 00 00 00     call        ?ParentOrShadowHostOrFrameOwner@blink@@YAPAVContainerNode@1@PBVNode@1@@Z
  00000037: 83 F8 00           cmp         eax,0
  0000003A: 0F 84 15 00 00 00  je          00000055
  00000040: 8B 44 24 60        mov         eax,dword ptr [esp+60h]
Blocking: 82385
Labels: Needs-Feedback
Owner: yoichio@chromium.org
Status: Assigned (was: Available)

Comment 3 by thakis@chromium.org, Oct 20 2017

yoichio: ping
Summary: Clang goma for win deletes "#ifndef NDEBUG" functions for debug in webkit_unit_tests. (was: Clang goma for win deletes "#ifndef NDEBUG" functions for debug.)
When I break on a line in webkit_unit_tests, visual studio warns
> node->ShowTreeForThisAcrossFrame()
Function blink::Node::ShowTreeForThisAcrossFrame has no address, possibly due to compiler optimizations.

If I step into core code, it works.

Comment 5 by h...@chromium.org, Oct 27 2017

Blocking: 636111
Oh, it's a debug info problem.
Owner: ----
Status: Available (was: Assigned)
Components: Build
Is this still an issue?
Yes.
Any updates?
Cc: tikuta@chromium.org
Maybe you need to pass /OPT:NOREF to lld linker for preventing function removal.
https://docs.microsoft.com/en-us/cpp/build/reference/opt-optimizations

Sign in to add a comment