[FIX]Allocator mismatch in XPCConvert::NativeData2JS

RESOLVED FIXED in mozilla1.9alpha3

Status

()

P2
critical
RESOLVED FIXED
12 years ago
12 years ago

People

(Reporter: bzbarsky, Assigned: bzbarsky)

Tracking

Trunk
mozilla1.9alpha3
x86
Windows XP
Points:
---
Bug Flags:
in-testsuite ?

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

A buffer is allocated with UTF8ToNewUnicode and then passed to JS_NewUCString.  Only buffers allocated with JS_Malloc should be passed to JS_NewUCString.  See bug 352855.
Unfortunately on Windows allocator mismatches like this tend to produce weird crashes... 
Severity: normal → critical
Flags: blocking1.9?
OS: Linux → Windows XP
I think the best ways to deal with this short-term are to either start copying here or make a copy of UTF8ToNewUnicode that uses JS_malloc to allocate....  Longer term we just want to fix bug 315288, I'd think.
Depends on: 315288
Assignee: dbradley → nobody
Created attachment 256576 [details] [diff] [review]
Or we can use our existing external string setup...
Assignee: nobody → bzbarsky
Status: NEW → ASSIGNED
Attachment #256576 - Flags: superreview?(brendan)
Attachment #256576 - Flags: review?(jst)
(Assignee)

Updated

12 years ago
Priority: -- → P2
Summary: Allocator mismatch in XPCConvert::NativeData2JS → [FIX]Allocator mismatch in XPCConvert::NativeData2JS
Target Milestone: --- → mozilla1.9alpha3
Comment on attachment 256576 [details] [diff] [review]
Or we can use our existing external string setup...

Presumptive sr=me pending r+jst.

/be
Attachment #256576 - Flags: superreview?(brendan) → superreview+
Attachment #256576 - Flags: review?(jst) → review+
Fixed.
Status: ASSIGNED → RESOLVED
Last Resolved: 12 years ago
Resolution: --- → FIXED
(Assignee)

Updated

12 years ago
Flags: blocking1.9? → in-testsuite?
You need to log in before you can comment on or make changes to this bug.