Closed
Bug 1239516
Opened 9 years ago
Closed 8 years ago
ASSERTION: nsTDependentString must wrap only null-terminated strings. You are probably looking for nsTDependentSubstring.: 'mData[mLength] == 0'
Categories
(Core :: XPCOM, defect)
Core
XPCOM
Tracking
()
RESOLVED
FIXED
mozilla46
People
(Reporter: MatsPalmgren_bugz, Assigned: MatsPalmgren_bugz)
References
Details
(Keywords: assertion, regression)
Attachments
(1 file)
898 bytes,
patch
|
karlt
:
review+
Sylvestre
:
approval-mozilla-beta+
|
Details | Diff | Splinter Review |
I get this assertion when running reftests in a local beta debug build on Linux64. Looking at the blame I guess it's a regression from bug 1227023. The call comes from here: http://hg.mozilla.org/mozilla-central/annotate/ad1f85f172b7/xpcom/base/nsSystemInfo.cpp#l706
Assignee | ||
Comment 1•9 years ago
|
||
This makes the assertion go away, fwiw.
Comment 2•8 years ago
|
||
Comment on attachment 8707680 [details] [diff] [review] fix? Thank you. That is what I was thinking the length argument was for.
Attachment #8707680 -
Flags: review+
Comment 3•8 years ago
|
||
And that's actually what I was meaning to do, but failed to.
Comment 5•8 years ago
|
||
Looking through the uses of IsTerminated(), I think this will only cause real problems if secondaryLibrary is used together with nsPromiseFlatCString. secondaryLibrary is only read from javascript and concatenated among other strings. I don't know what code does js reads, but I think use of nsPromiseFlatCString would be unlikely. I ran valgrind --tool=memcheck on amd64 firefox-44.0b8, checked for updates, and no uninitialized reads were reported.
status-firefox44:
--- → affected
status-firefox45:
--- → affected
Comment 6•8 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/37d094c1ed1e
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla46
Comment 7•8 years ago
|
||
Comment on attachment 8707680 [details] [diff] [review] fix? Approval Request Comment [Feature/regressing bug #]: bug 1227023 [User impact if declined]: I don't expect any problems from this bug on its own, but the patch is required for the patch in bug 1245745 to apply cleanly to 45. [Describe test coverage new/current, TreeHerder]: There are existing tests running this code, but they don't expect any particular string AFAIK. [Risks and why]: low [String/UUID change made/needed]: none
Attachment #8707680 -
Flags: approval-mozilla-beta?
Updated•8 years ago
|
Assignee: nobody → mats
Comment 8•8 years ago
|
||
Comment on attachment 8707680 [details] [diff] [review] fix? Necessary for bug 1245745
Attachment #8707680 -
Flags: approval-mozilla-beta? → approval-mozilla-beta+
Comment 9•8 years ago
|
||
bugherder uplift |
https://hg.mozilla.org/releases/mozilla-beta/rev/d9bbf3f7bbf8
Comment 10•8 years ago
|
||
For your reference I also hit this with vanilla firefox-44.0: ASSERTION: nsTDependentString must wrap only null-terminated strings. You are probably looking for nsTDependentSubstring.: 'mData[mLength] == 0', file ../../dist/include/nsTString.h, line 455
You need to log in
before you can comment on or make changes to this bug.
Description
•