"ASSERTION: nsTDependentString must wrap only null-terminated strings" with dom.url.encode_decode_hash

RESOLVED FIXED in Firefox 38

Status

()

defect
RESOLVED FIXED
5 years ago
4 years ago

People

(Reporter: jruderman, Assigned: valentin.gosu)

Tracking

(Blocks 1 bug, {assertion, regression, testcase})

Trunk
mozilla39
x86_64
macOS
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(firefox38 fixed, firefox38.0.5 fixed, firefox39 fixed)

Details

Attachments

(3 attachments)

Posted file testcase
1. Set:
     user_pref("dom.url.encode_decode_hash", true);
   [This pref was added in bug 1093611, for restoring old behavior.]
2. Load the testcase in a debug build

###!!! ASSERTION: nsTDependentString must wrap only null-terminated strings. You are probably looking for nsTDependentSubstring.: 'mData[mLength] == 0', file nsTString.h, line 455
Posted file stack
Assignee: nobody → valentin.gosu
Status: NEW → ASSIGNED
Comment on attachment 8581054 [details] [diff] [review]
Fix assertion with dom.url.encode_decode_hash pref set to true

Review of attachment 8581054 [details] [diff] [review]:
-----------------------------------------------------------------

::: netwerk/base/nsStandardURL.cpp
@@ +2513,5 @@
>          mRef.mPos = mSpec.Length();
>          mRef.mLen = 0;
>      }
>  
> +    nsAutoCString buf;

please comment how this memory ends up attached to another variable and how it is used below.. its obviously not intuitive :)
Attachment #8581054 - Flags: review?(mcmanus) → review+
https://hg.mozilla.org/mozilla-central/rev/21695668595d
Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla39
Comment on attachment 8581054 [details] [diff] [review]
Fix assertion with dom.url.encode_decode_hash pref set to true

Approval Request Comment
[Feature/regressing bug #]:
Bug 1093611

[User impact if declined]:
Blocks Bug 1149913 from being uplifted to beta.

[Describe test coverage new/current, TreeHerder]:
This code is currently on aurora. Manual testing.

[Risks and why]: 
Very low risk. This is a trivial bug, with an obvious fix.

[String/UUID change made/needed]:
None.
Attachment #8581054 - Flags: approval-mozilla-beta?
Comment on attachment 8581054 [details] [diff] [review]
Fix assertion with dom.url.encode_decode_hash pref set to true

Should be in 38 beta 7
Attachment #8581054 - Flags: approval-mozilla-beta? → approval-mozilla-beta+
You need to log in before you can comment on or make changes to this bug.