Starting it under gdb shows that it crashes due to infinite recursion copying a string: (gdb) bt #0 0x00007fffe443ab5d in mozilla::detail::nsTStringRepr::nsTStringRepr(char*, unsigned int, mozilla::detail::StringDataFlags, mozilla::detail::StringClassFlags) (this=, aData=0x7fffea2099c4 "", aLength=0, aDataFlags=mozilla::detail::StringDataFlags::TERMINATED, aClassFlags=mozilla::detail::StringClassFlags::NULL_TERMINATED) at xpcom/string/nsTStringRepr.h:322 #1 0x00007fffe443ab5d in nsTSubstring::nsTSubstring(mozilla::detail::StringClassFlags) (this=, aClassFlags=mozilla::detail::StringClassFlags::NULL_TERMINATED) at xpcom/string/nsTSubstring.h:1142 #2 0x00007fffe443ab5d in nsTString::nsTString(nsTSubstringTuple const&) (this=, aTuple=...) at xpcom/string/nsTString.h:95 #3 0x00007fffe443ab5d in nsTSubstring::Assign(nsTSubstringTuple const&, std::nothrow_t const&) (this=0x7fffdf6bf040, aTuple=..., aFallible=...) at xpcom/string/nsTSubstring.cpp:556 #4 0x00007fffe443ab82 in nsTSubstring::Assign(nsTSubstringTuple const&) (this=0x7fffea2099c4 , aTuple=...) at xpcom/string/nsTSubstring.cpp:546 #5 0x00007fffe443ab82 in nsTString::nsTString(nsTSubstringTuple const&) (this=0x7fffea2099c4 , aTuple=...) at xpcom/string/nsTString.h:96 #6 0x00007fffe443ab82 in nsTSubstring::Assign(nsTSubstringTuple const&, std::nothrow_t const&) (this=0x7fffdf6bf090, aTuple=..., aFallible=...) at xpcom/string/nsTSubstring.cpp:556 #7 0x00007fffe443ab82 in nsTSubstring::Assign(nsTSubstringTuple const&) (this=0x7fffea2099c4 , aTuple=...) at xpcom/string/nsTSubstring.cpp:546 #8 0x00007fffe443ab82 in nsTString::nsTString(nsTSubstringTuple const&) (this=0x7fffea2099c4 , aTuple=...) at xpcom/string/nsTString.h:96 #9 0x00007fffe443ab82 in nsTSubstring::Assign(nsTSubstringTuple const&, std::nothrow_t const&) (this=0x7fffdf6bf0e0, aTuple=..., aFallible=...) at xpcom/string/nsTSubstring.cpp:556 #10 0x00007fffe443ab82 in nsTSubstring::Assign(nsTSubstringTuple const&) (this=0x7fffea2099c4 , aTuple=...) at xpcom/string/nsTSubstring.cpp:546 #11 0x00007fffe443ab82 in nsTString::nsTString(nsTSubstringTuple const&) (this=0x7fffea2099c4 , aTuple=...) at xpcom/string/nsTString.h:96 #12 0x00007fffe443ab82 in nsTSubstring::Assign(nsTSubstringTuple const&, std::nothrow_t const&) (this=0x7fffdf6bf130, aTuple=..., aFallible=...) at xpcom/string/nsTSubstring.cpp:556 #13 0x00007fffe443ab82 in nsTSubstring::Assign(nsTSubstringTuple const&) (this=0x7fffea2099c4 , aTuple=...) at xpcom/string/nsTSubstring.cpp:546 #14 0x00007fffe443ab82 in nsTString::nsTString(nsTSubstringTuple const&) (this=0x7fffea2099c4 , aTuple=...) at xpcom/string/nsTString.h:96 #15 0x00007fffe443ab82 in nsTSubstring::Assign(nsTSubstringTuple const&, std::nothrow_t const&) (this=0x7fffdf6bf180, aTuple=..., aFallible=...) at xpcom/string/nsTSubstring.cpp:556 #16 0x00007fffe443ab82 in nsTSubstring::Assign(nsTSubstringTuple const&) (this=0x7fffea2099c4 , aTuple=...) at xpcom/string/nsTSubstring.cpp:546 #17 0x00007fffe443ab82 in nsTString::nsTString(nsTSubstringTuple const&) (this=0x7fffea2099c4 , aTuple=...) at xpcom/string/nsTString.h:96 #18 0x00007fffe443ab82 in nsTSubstring::Assign(nsTSubstringTuple const&, std::nothrow_t const&) (this=0x7fffdf6bf1d0, aTuple=..., aFallible=...) at xpcom/string/nsTSubstring.cpp:556 #19 0x00007fffe443ab82 in nsTSubstring::Assign(nsTSubstringTuple const&) (this=0x7fffea2099c4 , aTuple=...) at xpcom/string/nsTSubstring.cpp:546 #20 0x00007fffe443ab82 in nsTString::nsTString(nsTSubstringTuple const&) (this=0x7fffea2099c4 , aTuple=...) at xpcom/string/nsTString.h:96 #21 0x00007fffe443ab82 in nsTSubstring::Assign(nsTSubstringTuple const&, std::nothrow_t const&) (this=0x7fffdf6bf220, aTuple=..., aFallible=...) at xpcom/string/nsTSubstring.cpp:556 #22 0x00007fffe443ab82 in nsTSubstring::Assign(nsTSubstringTuple const&) (this=0x7fffea2099c4 , aTuple=...) at xpcom/string/nsTSubstring.cpp:546