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
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
Created attachment 256576 [details] [diff] [review] Or we can use our existing external string setup...
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+
Status: ASSIGNED → RESOLVED
Last Resolved: 12 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.