Open Bug 1398213 Opened 7 years ago Updated 2 years ago

Use of lambda provokes internal compiler error in hazard build

Categories

(Core :: JavaScript: GC, defect, P3)

55 Branch
defect

Tracking

()

Tracking Status
firefox57 --- affected

People

(Reporter: jonco, Unassigned)

References

Details

The use of lambdas in https://bugzilla.mozilla.org/attachment.cgi?id=8905512 in bug 1368420 causes the hazard analysis to die with an internal compiler error. It's the one in OrderedHashTable::remove(). As far as I can tell gcc 4.9.4 should support this. [task 2017-09-08T16:24:46.344653Z] 2:02.39 In file included from /builds/worker/checkouts/gecko/js/src/gc/Marking.h:15:0, [task 2017-09-08T16:24:46.344702Z] 2:02.39 from /builds/worker/checkouts/gecko/js/src/jsobj.h:22, [task 2017-09-08T16:24:46.344757Z] 2:02.39 from /builds/worker/checkouts/gecko/js/src/builtin/AtomicsObject.h:13, [task 2017-09-08T16:24:46.344911Z] 2:02.39 from /builds/worker/checkouts/gecko/js/src/builtin/AtomicsObject.cpp:48, [task 2017-09-08T16:24:46.345080Z] 2:02.39 from /builds/worker/checkouts/gecko/obj-analyzed/js/src/Unified_cpp_js_src0.cpp:2: [task 2017-09-08T16:24:46.345334Z] 2:02.40 /builds/worker/checkouts/gecko/js/src/ds/OrderedHashTable.h: In instantiation of 'js::detail::OrderedHashTable<T, Ops, AllocPolicy>::remove(const Lookup&, bool*)::<lambda(js::detail::OrderedHashTable<T, Ops, AllocPolicy>::Range*)> [with T = js::OrderedHashMap<js::HashableValue, js::HeapPtr<JS::Value>, js::HashableValue::Hasher, js::RuntimeAllocPolicy>::Entry; Ops = js::OrderedHashMap<js::HashableValue, js::HeapPtr<JS::Value>, js::HashableValue::Hasher, js::RuntimeAllocPolicy>::MapOps; AllocPolicy = js::RuntimeAllocPolicy]': [task 2017-09-08T16:24:46.346636Z] 2:02.40 /builds/worker/checkouts/gecko/js/src/ds/OrderedHashTable.h:227:25: required from 'struct js::detail::OrderedHashTable<T, Ops, AllocPolicy>::remove(const Lookup&, bool*) [with T = js::OrderedHashMap<js::HashableValue, js::HeapPtr<JS::Value>, js::HashableValue::Hasher, js::RuntimeAllocPolicy>::Entry; Ops = js::OrderedHashMap<js::HashableValue, js::HeapPtr<JS::Value>, js::HashableValue::Hasher, js::RuntimeAllocPolicy>::MapOps; AllocPolicy = js::RuntimeAllocPolicy; js::detail::OrderedHashTable<T, Ops, AllocPolicy>::Lookup = js::HashableValue]::<lambda(class js::detail::OrderedHashTable<js::OrderedHashMap<js::HashableValue, js::HeapPtr<JS::Value>, js::HashableValue::Hasher, js::RuntimeAllocPolicy>::Entry, js::OrderedHashMap<js::HashableValue, js::HeapPtr<JS::Value>, js::HashableValue::Hasher, js::RuntimeAllocPolicy>::MapOps, js::RuntimeAllocPolicy>::Range*)>' [task 2017-09-08T16:24:46.346858Z] 2:02.40 /builds/worker/checkouts/gecko/js/src/ds/OrderedHashTable.h:228:10: required from 'bool js::detail::OrderedHashTable<T, Ops, AllocPolicy>::remove(const Lookup&, bool*) [with T = js::OrderedHashMap<js::HashableValue, js::HeapPtr<JS::Value>, js::HashableValue::Hasher, js::RuntimeAllocPolicy>::Entry; Ops = js::OrderedHashMap<js::HashableValue, js::HeapPtr<JS::Value>, js::HashableValue::Hasher, js::RuntimeAllocPolicy>::MapOps; AllocPolicy = js::RuntimeAllocPolicy; js::detail::OrderedHashTable<T, Ops, AllocPolicy>::Lookup = js::HashableValue]' [task 2017-09-08T16:24:46.347004Z] 2:02.40 /builds/worker/checkouts/gecko/js/src/ds/OrderedHashTable.h:799:85: required from 'bool js::OrderedHashMap<Key, Value, OrderedHashPolicy, AllocPolicy>::remove(const Key&, bool*) [with Key = js::HashableValue; Value = js::HeapPtr<JS::Value>; OrderedHashPolicy = js::HashableValue::Hasher; AllocPolicy = js::RuntimeAllocPolicy]' [task 2017-09-08T16:24:46.347065Z] 2:02.40 /builds/worker/checkouts/gecko/js/src/builtin/MapObject.cpp:860:28: required from here [task 2017-09-08T16:24:46.347166Z] 2:02.40 /builds/worker/checkouts/gecko/js/src/ds/OrderedHashTable.h:228:9: internal compiler error: in dependent_type_p, at cp/pt.c:20574 [task 2017-09-08T16:24:46.347202Z] 2:02.40 }); [task 2017-09-08T16:24:46.347232Z] 2:02.40 ^ [task 2017-09-08T16:24:46.347266Z] 2:02.40 0x5e399c dependent_type_p(tree_node*) [task 2017-09-08T16:24:46.347302Z] 2:02.40 ../../gcc-4.9.4/gcc/cp/pt.c:20574 [task 2017-09-08T16:24:46.347438Z] 2:02.40 0x5e3cb0 dependent_scope_p(tree_node*) [task 2017-09-08T16:24:46.347512Z] 2:02.40 ../../gcc-4.9.4/gcc/cp/pt.c:20605 [task 2017-09-08T16:24:46.347619Z] 2:02.40 0x5c70e7 make_typename_type(tree_node*, tree_node*, tag_types, int) [task 2017-09-08T16:24:46.347731Z] 2:02.40 ../../gcc-4.9.4/gcc/cp/decl.c:3379 [task 2017-09-08T16:24:46.347829Z] 2:02.40 0x69aef9 strip_typedefs(tree_node*) [task 2017-09-08T16:24:46.347927Z] 2:02.40 ../../gcc-4.9.4/gcc/cp/tree.c:1304 [task 2017-09-08T16:24:46.347962Z] 2:02.40 0x61ccb5 dump_type [task 2017-09-08T16:24:46.348089Z] 2:02.40 ../../gcc-4.9.4/gcc/cp/error.c:380 [task 2017-09-08T16:24:46.348207Z] 2:02.40 0x61bf96 dump_type_prefix [task 2017-09-08T16:24:46.348331Z] 2:02.40 ../../gcc-4.9.4/gcc/cp/error.c:795 [task 2017-09-08T16:24:46.348431Z] 2:02.40 0x61bf01 dump_type_prefix [task 2017-09-08T16:24:46.348541Z] 2:02.40 ../../gcc-4.9.4/gcc/cp/error.c:715 [task 2017-09-08T16:24:46.348669Z] 2:02.40 0x61cbec dump_type [task 2017-09-08T16:24:46.348780Z] 2:02.40 ../../gcc-4.9.4/gcc/cp/error.c:494 [task 2017-09-08T16:24:46.348857Z] 2:02.40 0x61f22e dump_parameters [task 2017-09-08T16:24:46.348928Z] 2:02.40 ../../gcc-4.9.4/gcc/cp/error.c:1572 [task 2017-09-08T16:24:46.348983Z] 2:02.40 0x61f9af dump_function_decl [task 2017-09-08T16:24:46.349105Z] 2:02.40 ../../gcc-4.9.4/gcc/cp/error.c:1507 [task 2017-09-08T16:24:46.349198Z] 2:02.40 0x61cab9 dump_scope [task 2017-09-08T16:24:46.349270Z] 2:02.40 ../../gcc-4.9.4/gcc/cp/error.c:144 [task 2017-09-08T16:24:46.349324Z] 2:02.40 0x61bb09 dump_aggr_type [task 2017-09-08T16:24:46.349422Z] 2:02.40 ../../gcc-4.9.4/gcc/cp/error.c:648 [task 2017-09-08T16:24:46.349529Z] 2:02.40 0x61ff35 type_as_string(tree_node*, int) [task 2017-09-08T16:24:46.349657Z] 2:02.40 ../../gcc-4.9.4/gcc/cp/error.c:2701 [task 2017-09-08T16:24:46.349732Z] 2:02.40 0x7fa91f9a3c58 XIL_CSUName(tree_node*, char const*) [task 2017-09-08T16:24:46.349799Z] 2:02.40 /home/worker/sixgill/gcc/type.c:315 [task 2017-09-08T16:24:46.349900Z] 2:02.40 0x7fa91f9a46b7 XIL_TranslateRecordType(tree_node*) [task 2017-09-08T16:24:46.349991Z] 2:02.40 /home/worker/sixgill/gcc/type.c:538 [task 2017-09-08T16:24:46.350104Z] 2:02.40 0x7fa91f9a5263 XIL_TranslateFunctionType(tree_node*) [task 2017-09-08T16:24:46.350194Z] 2:02.40 /home/worker/sixgill/gcc/type.c:700 [task 2017-09-08T16:24:46.350290Z] 2:02.40 0x7fa91f9a55e1 GlobalName [task 2017-09-08T16:24:46.351154Z] 2:02.40 /home/worker/sixgill/gcc/variable.c:77 [task 2017-09-08T16:24:46.351208Z] 2:02.40 0x7fa91f9a55e1 XIL_GlobalName(tree_node*) [task 2017-09-08T16:24:46.351245Z] 2:02.40 /home/worker/sixgill/gcc/variable.c:117 [task 2017-09-08T16:24:46.351293Z] 2:02.40 0x7fa91f9a5a09 generate_TranslateVar(tree_node*) [task 2017-09-08T16:24:46.351334Z] 2:02.40 /home/worker/sixgill/gcc/variable.c:219 [task 2017-09-08T16:24:46.351378Z] 2:02.40 0x7fa91f9a214c XIL_GenerateBlock(tree_node*) [task 2017-09-08T16:24:46.351415Z] 2:02.40 /home/worker/sixgill/gcc/xgill.c:244 [task 2017-09-08T16:24:46.351455Z] 2:02.40 Please submit a full bug report, [task 2017-09-08T16:24:46.351480Z] 2:02.40 with preprocessed source if appropriate. [task 2017-09-08T16:24:46.351500Z] 2:02.40 Please include the complete backtrace with any bug report. [task 2017-09-08T16:24:46.351519Z] 2:02.40 See <http://gcc.gnu.org/bugs.html> for instructions. [task 2017-09-08T16:24:46.351549Z] 2:02.40 /builds/worker/checkouts/gecko/config/rules.mk:1064: recipe for target 'Unified_cpp_js_src0.o' failed [task 2017-09-08T16:24:46.351570Z] 2:02.40 gmake[5]: *** [Unified_cpp_js_src0.o] Error 1
Flags: needinfo?(sphink)
I tried to work around this by passing an equivalent functor object but the same thing happened: https://treeherder.mozilla.org/#/jobs?repo=try&revision=22f3e306fd47858a5baa011311b682d5aa9b5a97&selectedJob=129618834
I can't get to it immediately, but the version of gcc used by the hazard analysis is now the oldest in use, and is holding us back from some c++14 features, so I need to upgrade again. I'd like to do that through a toolchain task this time, since it's such a pain to manually build and upload and register these things. That said, there's a good chance that this is a bug in sixgill, where it's not handling the construct properly. But the fix is pretty much the same; toolchain builds for the sixgill gcc plugin.
Depends on: 1339989
Flags: needinfo?(sphink)
Priority: -- → P3
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.