Closed Bug 1145812 Opened 6 years ago Closed 6 years ago

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

Categories

(Core :: Networking, defect)

x86_64
macOS
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla39
Tracking Status
firefox38 --- fixed
firefox38.0.5 --- fixed
firefox39 --- fixed

People

(Reporter: jruderman, Assigned: valentin)

References

(Blocks 1 open bug)

Details

(Keywords: assertion, regression, testcase)

Attachments

(3 files)

Attached 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
Attached 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: 6 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.