Closed Bug 1645416 Opened 4 years ago Closed 4 years ago

Investigate the struct layout of `MPSCQueue<T>::Message` on Windows

Categories

(Core :: Audio/Video: cubeb, task)

task

Tracking

()

RESOLVED FIXED
mozilla79
Tracking Status
firefox79 --- fixed

People

(Reporter: padenot, Assigned: padenot)

References

Details

Attachments

(2 files)

The layout is different and there seem to be a hole.

Same on android it seems. Probably differently sized types.

Severity: -- → N/A
Type: defect → task
Assignee: nobody → padenot

Green on try: https://treeherder.mozilla.org/#/jobs?repo=try&revision=35a45361452378100241ca677d2e3dc19b16617f it was a mix of 32bits vs. 64bits and TimeStamp, that changes size on different platforms. The assert is now re-enabled unconditionally.

Pushed by padenot@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/3a956cf3b8d3 Fix the TracePayload layout on 32bits and re-enable the static assert that check the struct has a size that is a power of two. r=achronop
Pushed by padenot@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/4ae7220cf7d8 Fix the TracePayload layout on 32bits and re-enable the static assert that check the struct has a size that is a power of two. r=achronop
Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla79
Pushed by padenot@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/55a444d9df03 Fix the TracePayload layout on 32bits and re-enable the static assert that check the struct has a size that is a power of two. r=achronop
Flags: needinfo?(padenot)
Status: REOPENED → RESOLVED
Closed: 4 years ago4 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla79

hey everyone, I get this beauty when compiling firefox-79.0_beta2 for armv7:

8:40.97 /usr/armv7a-unknown-linux-gnueabihf/tmp/portage/www-client/firefox-79.0_beta2/work/firefox-79.0/dom/media/MPSCQueue.h: In instantiation of 'class mozilla::MPSCQueue<mozilla::AsyncLogger::TracePayload>':
8:40.97 /usr/armv7a-unknown-linux-gnueabihf/tmp/portage/www-client/firefox-79.0_beta2/work/firefox-79.0/dom/media/AsyncLogger.h:251:27: required from here
8:40.97 /usr/armv7a-unknown-linux-gnueabihf/tmp/portage/www-client/firefox-79.0_beta2/work/firefox-79.0/dom/media/MPSCQueue.h:47:29: error: static assertion failed: MPSCQueue internal allocations must have a size that is a power of two
8:40.97 47 | static_assert(IsPowerOfTwo(sizeof(MPSCQueue<T>::Message)),
8:40.97 | ^

8:56.80 /usr/armv7a-unknown-linux-gnueabihf/tmp/portage/www-client/firefox-79.0_beta2/work/firefox-79.0/dom/media/MPSCQueue.h: In instantiation of 'class mozilla::MPSCQueue<mozilla::AsyncLogger::TracePayload>':
8:56.80 /usr/armv7a-unknown-linux-gnueabihf/tmp/portage/www-client/firefox-79.0_beta2/work/firefox-79.0/dom/media/AsyncLogger.h:251:27: required from here
8:56.80 /usr/armv7a-unknown-linux-gnueabihf/tmp/portage/www-client/firefox-79.0_beta2/work/firefox-79.0/dom/media/MPSCQueue.h:47:29: error: static assertion failed: MPSCQueue internal allocations must have a size that is a power of two
8:56.80 47 | static_assert(IsPowerOfTwo(sizeof(MPSCQueue<T>::Message)),

line 47 is guarded, it seems there's still a hole left for a failure:

#if !(defined(ANDROID) && defined(i386))
static_assert(IsPowerOfTwo(sizeof(MPSCQueue<T>::Message)),
"MPSCQueue internal allocations must have a size that is a "
"power of two ");
#endif

Attached file build.log.gz

here's the full build log, I'm on linux and cross compiling from amd64 host to armv7 target

I posted a patch in bug 1649691 if you can try it ?

Flags: needinfo?(herrtimson)

let's continue over in 1649691

Flags: needinfo?(herrtimson)
Regressions: 1649691
Blocks: 1667007
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: