Closed Bug 353107 Opened 18 years ago Closed 17 years ago

[FIX]Allocator mismatch in XPCConvert::NativeData2JS

Categories

(Core :: XPConnect, defect, P2)

x86
Windows XP
defect

Tracking

()

RESOLVED FIXED
mozilla1.9alpha3

People

(Reporter: bzbarsky, Assigned: bzbarsky)

References

Details

Attachments

(1 file)

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
Assignee: nobody → bzbarsky
Status: NEW → ASSIGNED
Attachment #256576 - Flags: superreview?(brendan)
Attachment #256576 - Flags: review?(jst)
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
Closed: 17 years ago
Resolution: --- → FIXED
Flags: blocking1.9? → in-testsuite?
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: