Closed
Bug 1363009
Opened 8 years ago
Closed 8 years ago
Vector.h: fails to build with gcc 7 on -Werror=strict-aliasing
Categories
(Core :: MFBT, defect)
Core
MFBT
Tracking
()
RESOLVED
FIXED
mozilla55
Tracking | Status | |
---|---|---|
firefox55 | --- | fixed |
People
(Reporter: Sylvestre, Assigned: andi)
References
Details
Attachments
(1 file)
^~
In file included from /root/firefox-gcc-last/obj-x86_64-pc-linux-gnu/dist/include/mozilla/ArrayUtils.h:14:0,
from /root/firefox-gcc-last/obj-x86_64-pc-linux-gnu/dist/include/mozilla/RangedPtr.h:15,
from /root/firefox-gcc-last/obj-x86_64-pc-linux-gnu/dist/include/mozilla/Range.h:10,
from /root/firefox-gcc-last/obj-x86_64-pc-linux-gnu/dist/include/js/CharacterEncoding.h:10,
from /root/firefox-gcc-last/js/src/jscntxt.h:14,
from /root/firefox-gcc-last/js/src/vm/RegExpObject.h:15,
from /root/firefox-gcc-last/js/src/builtin/RegExp.h:10,
from /root/firefox-gcc-last/js/src/builtin/RegExp.cpp:7:
/root/firefox-gcc-last/obj-x86_64-pc-linux-gnu/dist/include/mozilla/Vector.h: In instantiation of 'mozilla::Vector<T, N, AllocPolicy>::~Vector() [with T = JS::Value; long unsigned int MinInlineCapacity = 8; AllocPolicy = js::TempAllocPolicy]':
/root/firefox-gcc-last/obj-x86_64-pc-linux-gnu/dist/include/js/GCVector.h:36:7: required from here
/root/firefox-gcc-last/obj-x86_64-pc-linux-gnu/dist/include/mozilla/Vector.h:831:45: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing]
MOZ_ASSERT_IF(usingInlineStorage(), mTail.mCapacity == kInlineCapacity); \
~~~~~~^
/root/firefox-gcc-last/obj-x86_64-pc-linux-gnu/dist/include/mozilla/Assertions.h:402:69: note: in definition of macro 'MOZ_VALIDATE_ASSERT_CONDITION_TYPE'
static_assert(mozilla::detail::AssertionConditionType<decltype(x)>::isValid, \
^
/root/firefox-gcc-last/obj-x86_64-pc-linux-gnu/dist/include/mozilla/Assertions.h:435:39: note: in expansion of macro 'MOZ_ASSERT_HELPER1'
#define MOZ_RELEASE_ASSERT_GLUE(a, b) a b
^
/root/firefox-gcc-last/obj-x86_64-pc-linux-gnu/dist/include/mozilla/Assertions.h:437:3: note: in expansion of macro 'MOZ_RELEASE_ASSERT_GLUE'
MOZ_RELEASE_ASSERT_GLUE( \
^~~~~~~~~~~~~~~~~~~~~~~
/root/firefox-gcc-last/obj-x86_64-pc-linux-gnu/dist/include/mozilla/Assertions.h:442:27: note: in expansion of macro 'MOZ_RELEASE_ASSERT'
# define MOZ_ASSERT(...) MOZ_RELEASE_ASSERT(__VA_ARGS__)
^~~~~~~~~~~~~~~~~~
/root/firefox-gcc-last/obj-x86_64-pc-linux-gnu/dist/include/mozilla/Assertions.h:466:10: note: in expansion of macro 'MOZ_ASSERT'
MOZ_ASSERT(expr); \
^~~~~~~~~~
/root/firefox-gcc-last/obj-x86_64-pc-linux-gnu/dist/include/mozilla/Vector.h:831:3: note: in expansion of macro 'MOZ_ASSERT_IF'
MOZ_ASSERT_IF(usingInlineStorage(), mTail.mCapacity == kInlineCapacity); \
^~~~~~~~~~~~~
/root/firefox-gcc-last/obj-x86_64-pc-linux-gnu/dist/include/mozilla/Vector.h:904:3: note: in expansion of macro 'MOZ_REENTRANCY_GUARD_ET_AL'
MOZ_REENTRANCY_GUARD_ET_AL;
^~~~~~~~~~~~~~~~~~~~~~~~~~
Assignee | ||
Updated•8 years ago
|
Assignee: nobody → bpostelnicu
Comment 1•8 years ago
|
||
Do we support -fstrict-aliasing?
Assignee | ||
Comment 2•8 years ago
|
||
Most likely we shouldn't compile this with -fstrict-aliasing, I think we should use: -fno-strict-aliasing
Assignee | ||
Comment 3•8 years ago
|
||
More info can be found here why we don't support yet strict-aliasing: https://bugzilla.mozilla.org/show_bug.cgi?id=414641
Reporter | ||
Comment 4•8 years ago
|
||
ok, we should disable this option for real then and for everyone
Comment hidden (mozreview-request) |
Comment 6•8 years ago
|
||
Comment on attachment 8868073 [details]
Bug 1363009 - disable strict-aliasing for gcc in js/src.
Sorry I am not comfortable reviewing this; maybe a build peer would be more appropriate here.
Attachment #8868073 -
Flags: review?(bbouvier)
Assignee | ||
Updated•8 years ago
|
Attachment #8868073 -
Flags: review?(sphink)
Comment 7•8 years ago
|
||
mozreview-review |
Comment on attachment 8868073 [details]
Bug 1363009 - disable strict-aliasing for gcc in js/src.
https://reviewboard.mozilla.org/r/139686/#review144258
A little sad, but I agree with the change.
Attachment #8868073 -
Flags: review?(sphink) → review+
Pushed by bpostelnicu@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/48ff50f0db50
disable strict-aliasing for gcc in js/src. r=sfink
Comment 9•8 years ago
|
||
bugherder |
Status: NEW → RESOLVED
Closed: 8 years ago
status-firefox55:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla55
You need to log in
before you can comment on or make changes to this bug.
Description
•