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

Issue 636563 link

Starred by 4 users

Issue metadata

Status: Fixed
Owner:
Closed: Jan 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 2
Type: Bug



Sign in to add a comment

Some mojoms are included by multiple components, causing ODR violations

Project Member Reported by lukasza@chromium.org, Aug 10 2016

Issue description

REPRO STEPS:

$ cat out/gn/args.gn 
is_component_build = true
is_debug = false
dcheck_always_on = true
use_goma = true
is_asan = true
is_lsan = true
enable_nacl = false
enable_google_now = false
$ ninja -C out/gn -j 1500 -l 13 blink_tests
$ out/gn/content_shell

EXPECTED BEHAVIOR: can run layout tests

ACTUAL BEHAVIOR: content shell fails to launch because of ODR violation detected by ASAN:

  [1] size=35 'blink::mojom::PaymentRequestClient::Name_' gen/third_party/WebKit/public/platform/modules/payments/payment_request.mojom.cc:2130:34
  [2] size=35 'blink::mojom::PaymentRequestClient::Name_' gen/third_party/WebKit/public/platform/modules/payments/payment_request.mojom.cc:2130:34
These globals were registered at these points:
  [1]:
    #0 0x48a667  (/usr/local/google/home/lukasza/src/chromium2/src/out/gn/content_shell+0x48a667)
    #1 0x7fc9d8a8b09b  (/usr/local/google/home/lukasza/src/chromium2/src/out/gn/./libcontent.so+0x151409b)

  [2]:
    #0 0x48a667  (/usr/local/google/home/lukasza/src/chromium2/src/out/gn/content_shell+0x48a667)
    #1 0x7fc9ced6180b  (/usr/local/google/home/lukasza/src/chromium2/src/out/gn/./libblink_platform.so+0xd3980b)

 
Components: Internals>Mojo
Owner: jam@chromium.org
This has regressed in jam@'s r410451
Components: Build
Labels: Stability-Memory-AddressSanitizer
In case this helps, let me point out another, component-build-specific ODR violation -  issue 601189  (which was fixed around a month ago - in June 2016).
Cc: roc...@chromium.org

Comment 4 by sa...@chromium.org, Dec 19 2016

Cc: jam@chromium.org
Owner: sa...@chromium.org
Status: Started (was: Untriaged)
Summary: Some mojoms are included by multiple components, causing ODR violations (was: ODR violation in component build: blink::mojom::PaymentRequestClient::Name_)

Comment 5 by sa...@chromium.org, Dec 19 2016

Cc: junov@chromium.org danakj@chromium.org sky@chromium.org xlai@chromium.org rjkroege@chromium.org sadrul@chromium.org enne@chromium.org
 Issue 674953  has been merged into this issue.

Comment 6 by sa...@chromium.org, Dec 19 2016

Cc: brettw@chromium.org
 Issue 660479  has been merged into this issue.
Project Member

Comment 7 by bugdroid1@chromium.org, Dec 20 2016

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

commit ca5c38a9bf976e082d873f2f3cd0cb0d923e9159
Author: sammc <sammc@chromium.org>
Date: Tue Dec 20 04:28:33 2016

Fix ODR violations caused by mojoms being included in multiple components.

This also changes the component //device/generic_sensor/public/cpp to
use a different export define to //device/generic_sensor.

BUG= 636563 

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

[modify] https://crrev.com/ca5c38a9bf976e082d873f2f3cd0cb0d923e9159/device/generic_sensor/BUILD.gn
[modify] https://crrev.com/ca5c38a9bf976e082d873f2f3cd0cb0d923e9159/device/generic_sensor/linux/sensor_device_manager.h
[modify] https://crrev.com/ca5c38a9bf976e082d873f2f3cd0cb0d923e9159/device/generic_sensor/platform_sensor_provider_linux.h
[modify] https://crrev.com/ca5c38a9bf976e082d873f2f3cd0cb0d923e9159/device/generic_sensor/platform_sensor_reader_linux.h
[modify] https://crrev.com/ca5c38a9bf976e082d873f2f3cd0cb0d923e9159/device/generic_sensor/public/cpp/BUILD.gn
[add] https://crrev.com/ca5c38a9bf976e082d873f2f3cd0cb0d923e9159/device/generic_sensor/public/cpp/generic_sensor_public_export.h
[modify] https://crrev.com/ca5c38a9bf976e082d873f2f3cd0cb0d923e9159/device/generic_sensor/public/cpp/platform_sensor_configuration.h
[modify] https://crrev.com/ca5c38a9bf976e082d873f2f3cd0cb0d923e9159/device/generic_sensor/public/cpp/sensor_reading.h
[modify] https://crrev.com/ca5c38a9bf976e082d873f2f3cd0cb0d923e9159/device/generic_sensor/public/interfaces/BUILD.gn
[modify] https://crrev.com/ca5c38a9bf976e082d873f2f3cd0cb0d923e9159/third_party/WebKit/Source/core/offscreencanvas/BUILD.gn

Project Member

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

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

commit f5a9a71738b5016364f138e5b729f4d87221705f
Author: sammc <sammc@chromium.org>
Date: Mon Jan 09 03:56:11 2017

Add visibility restrictions to all mojoms that export symbols.

This brings those mojoms into line with the recommendations of
https://chromium.googlesource.com/chromium/src/+/master/docs/component_build.md#Depending-on-a-source-set-or-static-library-from-both-inside-and-outside-a-component

This also adds a |visiblity_blink| variable to mojom targets so they
can limit visibility to the chromium and blink variants separately.

BUG= 636563 

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

[modify] https://crrev.com/f5a9a71738b5016364f138e5b729f4d87221705f/chrome/browser/BUILD.gn
[modify] https://crrev.com/f5a9a71738b5016364f138e5b729f4d87221705f/device/generic_sensor/public/interfaces/BUILD.gn
[modify] https://crrev.com/f5a9a71738b5016364f138e5b729f4d87221705f/mojo/public/BUILD.gn
[modify] https://crrev.com/f5a9a71738b5016364f138e5b729f4d87221705f/mojo/public/interfaces/bindings/BUILD.gn
[modify] https://crrev.com/f5a9a71738b5016364f138e5b729f4d87221705f/mojo/public/interfaces/bindings/tests/BUILD.gn
[modify] https://crrev.com/f5a9a71738b5016364f138e5b729f4d87221705f/mojo/public/tools/bindings/mojom.gni
[modify] https://crrev.com/f5a9a71738b5016364f138e5b729f4d87221705f/third_party/WebKit/Source/bindings/modules/BUILD.gn
[modify] https://crrev.com/f5a9a71738b5016364f138e5b729f4d87221705f/third_party/WebKit/public/BUILD.gn

Comment 10 by sa...@chromium.org, Jan 15 2017

Status: Fixed (was: Started)

Sign in to add a comment