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

Issue 736309 link

Starred by 1 user

Issue metadata

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

Blocked on:
issue 735328



Sign in to add a comment

MediaStreamConstraintsUtilAudioTest failing on Windows Clang DLL bots

Project Member Reported by guidou@chromium.org, Jun 23 2017

Issue description

Project Member

Comment 1 by bugdroid1@chromium.org, Jun 23 2017

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

commit 964d2c65e8b24f15ddaeb18429b5ce1d3469d445
Author: guidou <guidou@chromium.org>
Date: Fri Jun 23 16:56:30 2017

Update MediaStreamConstraintsAudioUtil unit tests.

Use array elements instead of pointer values in comparisons involving
pointers to member functions.
One of these comparisons failed on Windows Debug and others are suspect
of failing on WinClang DLL builds.

BUG= 736309 

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

[modify] https://crrev.com/964d2c65e8b24f15ddaeb18429b5ce1d3469d445/content/renderer/media/media_stream_constraints_util_audio_unittest.cc

Comment 2 by r...@chromium.org, Jun 23 2017

This turned out to be a Clang bug: https://bugs.llvm.org/show_bug.cgi?id=33570

Basically, a global containing a member function pointer will point to the import thunk and not the actual function in the DLL. This will cause the equality comparison failures that we observed.

Comment 3 by r...@chromium.org, Jun 23 2017

Cc: h...@chromium.org
Labels: clang
+hans, the sheriff, and pasting in some test keywords for searchability:
content_unittests
CrWinClang
MediaStreamConstraintsUtilAudioTest SingleBoolConstraint

Comment 4 by r...@chromium.org, Jun 23 2017

Blockedon: 735328

Comment 5 by r...@chromium.org, Jun 23 2017

I fixed this upstream. When we roll clang past r306137 we should be able to revert some or all of the comparison hacks in the test.

Comment 6 by r...@chromium.org, Jun 23 2017

I had to revert the fix because it causes clang to reject certain uses of dllimport member functions as non-type template parameters. Hopefully I'll find time to get to this next week.

Comment 7 by guidou@chromium.org, Jun 26 2017

r481932 didn't improve things on the broken bot.
rnk@: Should we revert it and wait for the proper fix in clang, or should we patch the test further to make the bot green?

Comment 8 by r...@chromium.org, Jun 26 2017

I built this configuration locally on Friday, so I'm set up to debug this and create a work around. I'll look into it and send you a CL.

Comment 9 by r...@chromium.org, Jun 28 2017

I debugged a bit more. This is the member pointer comparison that is failing:

  void CheckBoolDefaultsDeviceCapture(
      const AudioSettingsBoolMembers& exclude_main_settings,
      const AudioPropertiesBoolMembers& exclude_audio_properties,
      const AudioCaptureSettings& result) {
    if (!Contains(exclude_main_settings,
                  &AudioCaptureSettings::hotword_enabled)) {
      EXPECT_FALSE(result.hotword_enabled());
    }

That's because the values in exclude_main_settings are coming from this vector:
  const AudioSettingsBoolMembers kMainSettings = {
      &AudioCaptureSettings::hotword_enabled,
      &AudioCaptureSettings::disable_local_echo,
      &AudioCaptureSettings::render_to_associated_sink};

And that std::initializer_list points to a global array. Those elements point to the dllimport function thunks that don't compare equal with &AudioCaptureSettings::hotword_enabled as evaluated in CheckBoolDefaultsDeviceCapture.

I have a workaround using push_back at https://codereview.chromium.org/2960973002
Project Member

Comment 10 by bugdroid1@chromium.org, Jun 28 2017

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

commit b53707058233012ea4ac5efae690506e111bde37
Author: rnk <rnk@chromium.org>
Date: Wed Jun 28 13:59:13 2017

Work around dllimport member function pointer bug in clang

R=guidou@chromium.org,thakis@chromium.org
BUG= 736309 

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

[modify] https://crrev.com/b53707058233012ea4ac5efae690506e111bde37/content/renderer/media/media_stream_constraints_util_audio_unittest.cc

Comment 11 by r...@chromium.org, Jun 30 2017

Cc: euge...@chromium.org
My fix was incomplete, I forgot to run the rest of that test suite. I'll send another patch soon.
Project Member

Comment 12 by bugdroid1@chromium.org, Jun 30 2017

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

commit 6183dcba0a680757c19390420f76a250c4d0cbfa
Author: rnk <rnk@chromium.org>
Date: Fri Jun 30 18:13:15 2017

Work around the rest of the MediaStreamConstraintsUtilAudioTest failures

I missed some initializer lists used in this file. These are still
causing test failures on the pinned clang bots. I locally validated that
all MediaStreamConstraintsUtilAudioTest tests pass now, not just the
SingleBoolConstraint tests.

R=guidou@chromium.org,thakis@chromium.org
BUG= 736309 

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

[modify] https://crrev.com/6183dcba0a680757c19390420f76a250c4d0cbfa/content/renderer/media/media_stream_constraints_util_audio_unittest.cc

Status: Fixed (was: Assigned)
Project Member

Comment 14 by bugdroid1@chromium.org, Aug 30

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

commit 2a965ed86cda66fec6165f570a99747341c662c5
Author: Armando Miraglia <armax@chromium.org>
Date: Thu Aug 30 09:37:21 2018

[CLEANUP] Remove old comment and rewrite vector initialization.

Looking at the rest of the unit test, the issue raised by the TODO is
resolved. This cleanup CL replaces the push_back calls with brakets
initialization of the vector.

Bug:  736309 

Change-Id: I2a3d5335c8d71eeacc3e0661b2419c7dad87e7c2
Reviewed-on: https://chromium-review.googlesource.com/1193951
Commit-Queue: Armando Miraglia <armax@chromium.org>
Reviewed-by: Henrik Boström <hbos@chromium.org>
Cr-Commit-Position: refs/heads/master@{#587496}
[modify] https://crrev.com/2a965ed86cda66fec6165f570a99747341c662c5/content/renderer/media/stream/media_stream_constraints_util_audio_unittest.cc

Project Member

Comment 15 by bugdroid1@chromium.org, Dec 12

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

commit 86d53d0ee80d45d187ce98c94bc975c3a2b64b10
Author: Armando Miraglia <armax@chromium.org>
Date: Wed Dec 12 15:00:46 2018

[getUserMedia] Address old comments by folding initialization.

BUG= 736309 
TESTED=ninja -C out/Default/ content_unittests && ./out/Default/content_unittests
R=guidou@chromium.org

Change-Id: I838b68b20ed81a088312a4b0fd0f4527ada9b3b7
Reviewed-on: https://chromium-review.googlesource.com/c/1373817
Reviewed-by: Guido Urdaneta <guidou@chromium.org>
Commit-Queue: Armando Miraglia <armax@chromium.org>
Cr-Commit-Position: refs/heads/master@{#615887}
[modify] https://crrev.com/86d53d0ee80d45d187ce98c94bc975c3a2b64b10/content/renderer/media/stream/media_stream_constraints_util_audio_unittest.cc

Project Member

Comment 16 by bugdroid1@chromium.org, Dec 12

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

commit a3f03b6d4e0df5e625e07fcb0ee8a6c79f536ac9
Author: Armando Miraglia <armax@chromium.org>
Date: Wed Dec 12 15:47:54 2018

[getUserMedia] Address old comments by folding initialization.

Same as crrev.com/c/1373817, as I forgot to remove this one too in the
previous CL since I did not catch it.

BUG= 736309 
TESTED=ninja -C out/Default/ content_unittests && ./out/Default/content_unittests

Change-Id: I2d645cfcf65640b7a4a4623976be5642d32d30d2
Reviewed-on: https://chromium-review.googlesource.com/c/1373824
Reviewed-by: Guido Urdaneta <guidou@chromium.org>
Commit-Queue: Armando Miraglia <armax@chromium.org>
Cr-Commit-Position: refs/heads/master@{#615902}
[modify] https://crrev.com/a3f03b6d4e0df5e625e07fcb0ee8a6c79f536ac9/content/renderer/media/stream/media_stream_constraints_util_audio_unittest.cc

Sign in to add a comment