Closed
Bug 1451088
Opened 6 years ago
Closed 6 years ago
Clang 3.8: error: default initialization of an object of const type 'const js::jit::ArithPolicy' without a user-provided default constructor
Categories
(Core :: JavaScript Engine: JIT, defect, P3)
Core
JavaScript Engine: JIT
Tracking
()
RESOLVED
FIXED
mozilla61
Tracking | Status | |
---|---|---|
firefox-esr52 | --- | unaffected |
firefox59 | --- | unaffected |
firefox60 | --- | unaffected |
firefox61 | --- | fixed |
People
(Reporter: mccr8, Assigned: pbone)
References
Details
(Keywords: regression)
Attachments
(1 file, 2 obsolete files)
13.39 KB,
patch
|
Waldo
:
review+
|
Details | Diff | Splinter Review |
I've seen this error before, in bug 1444472, but now it is hitting in some JIT code. I'm using clang 3.8. (I should really figure out how to install a newer compiler version on this Ubuntu machine. The version of GCC it is using is unsupported at all by Firefox...)
Comment 1•6 years ago
|
||
jandem asked me about this the other day in IRC: https://bugzilla.mozilla.org/show_bug.cgi?id=1448821#c10
Reporter | ||
Comment 2•6 years ago
|
||
Maybe the minimum Clang version should get bumped to something that doesn't hit that, if we're going to keep hitting this. Anyways, this finally got me to figure out how to use a newer version of Clang on my machine (I can't use the stock GCC version any more either) through the power of a Google search so it had that positive effect. ;)
Reporter | ||
Updated•6 years ago
|
Blocks: 1448821
Keywords: regression
Summary: error: default initialization of an object of const type 'const js::jit::ArithPolicy' without a user-provided default constructor → Clang 3.8: error: default initialization of an object of const type 'const js::jit::ArithPolicy' without a user-provided default constructor
Reporter | ||
Comment 3•6 years ago
|
||
Nathan suggested this fix, but it does not work for me.
Reporter | ||
Comment 4•6 years ago
|
||
Nathan suggested I make the ctor public rather than private, which will be useful if anybody else wants to call it... That does fix the compile error for me.
Comment 5•6 years ago
|
||
I'm hitting the same thing. I haven't had time to test it yet, but I read in some stackoverflow post that the constructor might need to be _provided_ by the code, not just declared. So if second attempt doesn't work out, maybe try: constexpr TypePolicy() {}; too. FWIW the version I'm using with clang is the most up-to-date made available by Apple with XCode on OSX Yosemite (I'm also trying to figure out how to update it but I don't know how that will interact with everything else). Otherwise, I wonder if there's a way to make clang ignore this error..
Reporter | ||
Updated•6 years ago
|
Attachment #8964679 -
Attachment is obsolete: true
Reporter | ||
Comment 6•6 years ago
|
||
The patch I posted works for me, at least on Linux with Clang 3.8.
Comment 7•6 years ago
|
||
Argh, that doesn't work for me :'(. To make it work here, the constructor needs to be declared on every subclass of TypePolicy..
Comment 8•6 years ago
|
||
(In reply to Andrew McCreight [:mccr8] from comment #2) > Maybe the minimum Clang version should get bumped to something that doesn't > hit that, if we're going to keep hitting this. Yeah, what would it take to require Clang 3.9 (or something newer)? Automation does not use 3.8, we bumped GCC and MSVC recently, and apparently not that many of us are using Clang 3.8 locally.
Assignee | ||
Comment 9•6 years ago
|
||
This patch adds a default constructor to each of the TypePolicy subclasses. It fixes the problem for me on clang-3.8, Linux Mint (Ubuntu 16.04).
Assignee: nobody → pbone
Attachment #8964686 -
Attachment is obsolete: true
Status: NEW → ASSIGNED
Attachment #8968529 -
Flags: review?(continuation)
Reporter | ||
Comment 11•6 years ago
|
||
Comment on attachment 8968529 [details] [diff] [review] Bug 1454637 - Add constexpr constructors to the TypePolicy classes Review of attachment 8968529 [details] [diff] [review]: ----------------------------------------------------------------- This looks fine to me, but it should get review from a JS peer.
Attachment #8968529 -
Flags: review?(continuation) → review?(jdemooij)
Comment 12•6 years ago
|
||
Comment on attachment 8968529 [details] [diff] [review] Bug 1454637 - Add constexpr constructors to the TypePolicy classes Review of attachment 8968529 [details] [diff] [review]: ----------------------------------------------------------------- ::: js/src/jit/TypePolicy.h @@ +81,4 @@ > class BoxInputsPolicy final : public TypePolicy > { > public: > + constexpr BoxInputsPolicy() { }; Remove the trailing ';' off all these.
Attachment #8968529 -
Flags: review?(jdemooij) → review+
Comment 13•6 years ago
|
||
Pushed by pbone@mozilla.com: https://hg.mozilla.org/integration/mozilla-inbound/rev/bcbb16742a22 Add constexpr constructors to the TypePolicy classes r=waldo
Comment 14•6 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/bcbb16742a22
Status: ASSIGNED → RESOLVED
Closed: 6 years ago
status-firefox61:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla61
Updated•6 years ago
|
status-firefox59:
--- → unaffected
status-firefox60:
--- → unaffected
status-firefox-esr52:
--- → unaffected
Updated•6 years ago
|
Priority: -- → P3
You need to log in
before you can comment on or make changes to this bug.
Description
•