New issue
Advanced search Search tips

Issue 684911 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Feb 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux
Pri: 3
Type: Bug



Sign in to add a comment

vector_icons odr violation (views::kSubmenuArrowIcon)

Project Member Reported by tapted@chromium.org, Jan 25 2017

Issue description

Chrome Version: r445843

What steps will reproduce the problem?
(1) Build with is_asan = true, is_component_build = true
(2) run chrome

What is the expected result?

Launches

What happens instead?

=================================================================
==2965==ERROR: AddressSanitizer: odr-violation (0x7fea9c6a4100):
  [1] size=16 'views::kSubmenuArrowIcon' gen/ui/views/resources/vector_icons/vector_icons.cc:49:1
  [2] size=16 'views::kSubmenuArrowIcon' gen/ui/views/resources/vector_icons/vector_icons.cc:49:1
These globals were registered at these points:
  [1]:
    #0 0x7fea85953567  (/mnt/ssd/tapted/devel/git/chromium/src/out/gn_Asan/chrome+0x1877567)
    #1 0x7fea87b3f05d  (/mnt/ssd/tapted/devel/git/chromium/src/out/gn_Asan/chrome+0x3a6305d)

  [2]:
    #0 0x7fea85953567  (/mnt/ssd/tapted/devel/git/chromium/src/out/gn_Asan/chrome+0x1877567)
    #1 0x7fea64553fbd  (/mnt/ssd/tapted/devel/git/chromium/src/out/gn_Asan/./libviews.so+0x9e9fbd)

==2965==HINT: if you don't care about these errors you may set ASAN_OPTIONS=detect_odr_violation=0
SUMMARY: AddressSanitizer: odr-violation: global 'views::kSubmenuArrowIcon' at gen/ui/views/resources/vector_icons/vector_icons.cc:49:1
==2965==ABORTING

Still digesting the error.

Maybe kSubmenuArrowIcon is being picked by chance, and in fact all vector icons are ODR violations in a component build?

But kSubmenuArrowIcon is used under src/chrome in payment_sheet_view_controller -- maybe that has something to do with it

$ git grep kSubmenuArrowIcon
chrome/browser/ui/views/payments/payment_sheet_view_controller.cc:        views::kSubmenuArrowIcon,
ui/views/controls/menu/menu_image_util.cc:  return gfx::CreateVectorIcon(kSubmenuArrowIcon, icon_color);

 

Comment 1 by tapted@chromium.org, Jan 25 2017

Cc: -est...@chromium.org
Owner: est...@chromium.org
Status: Assigned (was: Untriaged)
This maybe regressed recently in https://codereview.chromium.org/2627353002 (r444104 - estade)

There chrome/browser/ui/BUILD.gn picks up a "//ui/views/resources/vector_icons" build dependency, but that target is a source_set. So it's getting linked in twice.

I'm not sure making vector_icons a static library target instead of a source_set will improve things.

Perhaps a header under ui/views needs to export these symbols so that other targets just need to depend on the views component to use these icons. I think it's illegal to depend on a source_set or static_library transitively through a component as well as depend on it directly.

Comment 2 by est...@chromium.org, Jan 25 2017

for components/ I've changed it so there's not a separate build target, so that's an option as well. I'll have a look.
Project Member

Comment 3 by bugdroid1@chromium.org, Jan 27 2017

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

commit d34536f5fddb8e11e0e24c12326f5f8523cbf98c
Author: estade <estade@chromium.org>
Date: Fri Jan 27 21:17:54 2017

Move views vector icons from source_set to part of views target.

This matches the pattern used for components/ vector icons
(see https://codereview.chromium.org/2644903004/ ) and fixes an ODR
violation.

BUG= 684911 

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

[modify] https://crrev.com/d34536f5fddb8e11e0e24c12326f5f8523cbf98c/chrome/browser/ui/BUILD.gn
[modify] https://crrev.com/d34536f5fddb8e11e0e24c12326f5f8523cbf98c/chrome/browser/ui/views/payments/payment_sheet_view_controller.cc
[modify] https://crrev.com/d34536f5fddb8e11e0e24c12326f5f8523cbf98c/ui/views/BUILD.gn
[modify] https://crrev.com/d34536f5fddb8e11e0e24c12326f5f8523cbf98c/ui/views/controls/button/checkbox.cc
[modify] https://crrev.com/d34536f5fddb8e11e0e24c12326f5f8523cbf98c/ui/views/controls/button/radio_button.cc
[modify] https://crrev.com/d34536f5fddb8e11e0e24c12326f5f8523cbf98c/ui/views/controls/menu/menu_image_util.cc
[delete] https://crrev.com/5258bfb4395abf16fca17a6c8fc09ff052eaf845/ui/views/resources/vector_icons/BUILD.gn
[rename] https://crrev.com/d34536f5fddb8e11e0e24c12326f5f8523cbf98c/ui/views/vector_icons/checkbox_active.icon
[rename] https://crrev.com/d34536f5fddb8e11e0e24c12326f5f8523cbf98c/ui/views/vector_icons/checkbox_normal.icon
[rename] https://crrev.com/d34536f5fddb8e11e0e24c12326f5f8523cbf98c/ui/views/vector_icons/combobox_arrow_mac_disabled.icon
[rename] https://crrev.com/d34536f5fddb8e11e0e24c12326f5f8523cbf98c/ui/views/vector_icons/combobox_arrow_mac_enabled.icon
[rename] https://crrev.com/d34536f5fddb8e11e0e24c12326f5f8523cbf98c/ui/views/vector_icons/menu_check.1x.icon
[rename] https://crrev.com/d34536f5fddb8e11e0e24c12326f5f8523cbf98c/ui/views/vector_icons/menu_check.icon
[rename] https://crrev.com/d34536f5fddb8e11e0e24c12326f5f8523cbf98c/ui/views/vector_icons/menu_radio_empty.icon
[rename] https://crrev.com/d34536f5fddb8e11e0e24c12326f5f8523cbf98c/ui/views/vector_icons/menu_radio_selected.icon
[rename] https://crrev.com/d34536f5fddb8e11e0e24c12326f5f8523cbf98c/ui/views/vector_icons/radio_button_active.icon
[rename] https://crrev.com/d34536f5fddb8e11e0e24c12326f5f8523cbf98c/ui/views/vector_icons/radio_button_normal.icon
[rename] https://crrev.com/d34536f5fddb8e11e0e24c12326f5f8523cbf98c/ui/views/vector_icons/submenu_arrow.1x.icon
[rename] https://crrev.com/d34536f5fddb8e11e0e24c12326f5f8523cbf98c/ui/views/vector_icons/submenu_arrow.icon
[rename] https://crrev.com/d34536f5fddb8e11e0e24c12326f5f8523cbf98c/ui/views/vector_icons/vector_icons.cc.template
[rename] https://crrev.com/d34536f5fddb8e11e0e24c12326f5f8523cbf98c/ui/views/vector_icons/vector_icons.h.template

Project Member

Comment 4 by bugdroid1@chromium.org, Jan 27 2017

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

commit bc2e9b86da06f3f673ff175001e8b886500102b2
Author: dbeam <dbeam@chromium.org>
Date: Fri Jan 27 22:07:08 2017

Remove /resources/ from a vector_icon.h include to fix Google Chrome Mac compile

TBR=estade@chromium.org
BUG= 684911 
NOTRY=true
NOTREECHECKS=true
NOPRESUBMIT=true

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

[modify] https://crrev.com/bc2e9b86da06f3f673ff175001e8b886500102b2/ui/views/style/platform_style_mac.mm

Project Member

Comment 5 by bugdroid1@chromium.org, Jan 27 2017

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

commit 5b207820938548653d3b8f0b539affa1bb14436f
Author: Dan Beam <dbeam@chromium.org>
Date: Fri Jan 27 22:15:36 2017

Actually fix Google Chrome Mac compile failure from vector_icon.h #include

TBR=estade@chromium.org
BUG= 684911 

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

[modify] https://crrev.com/5b207820938548653d3b8f0b539affa1bb14436f/ui/views/style/platform_style_mac.mm

when I run asan chrome I now get this error output, which detects an ODR violation in some other bit of code. Does this mean the vector icons ODR is fixed?

==3016==ERROR: AddressSanitizer: odr-violation (0x7fcf57e8c460):
  [1] size=4 'ppapi::proxy::TCPSocketResourceConstants::kMaxReadSize' ../../ppapi/proxy/tcp_socket_resource_constants.cc:10:43
  [2] size=4 'ppapi::proxy::TCPSocketResourceConstants::kMaxReadSize' ../../ppapi/proxy/tcp_socket_resource_constants.cc:10:43
These globals were registered at these points:
  [1]:
    #0 0x7fcf5e049977  (/usr/local/google/chrome/src/out/asan/chrome+0x11d7977)
    #1 0x7fcf55de1d6b  (/usr/local/google/chrome/src/out/asan/./libcontent.so+0x2a1bd6b)

  [2]:
    #0 0x7fcf5e049977  (/usr/local/google/chrome/src/out/asan/chrome+0x11d7977)
    #1 0x7fcf4d3f9adb  (/usr/local/google/chrome/src/out/asan/./libppapi_proxy.so+0x491adb)

==3016==HINT: if you don't care about these errors you may set ASAN_OPTIONS=detect_odr_violation=0
SUMMARY: AddressSanitizer: odr-violation: global 'ppapi::proxy::TCPSocketResourceConstants::kMaxReadSize' at ../../ppapi/proxy/tcp_socket_resource_constants.cc:10:43
==3016==ABORTING
ping tapted^
Status: Fixed (was: Assigned)
So.. I think that should be addressed too :/, but it's clearly not due to the vector icon stuff - it should be a new bug. I'm willing to assume the vector icon part is resolved (thanks!), but it's possible that ASAN is bailing out on the first error it finds, so there's a chance not.

There's probably quite a few low-priority termites that could crawl out of the woodwork, but we've been addressing these as they appear (e.g.  Issue 636563  and  Issue 601189 ).

Sign in to add a comment