Closed
Bug 602115
Opened 14 years ago
Closed 14 years ago
Crash [@ txExecutionState::popTemplateRule]
Categories
(Core :: XSLT, defect)
Tracking
()
People
(Reporter: jruderman, Assigned: sicking)
References
Details
(4 keywords, Whiteboard: [sg:critical?])
Crash Data
Attachments
(5 files, 1 obsolete file)
265 bytes,
text/html
|
Details | |
9.37 KB,
text/plain
|
Details | |
8.72 KB,
patch
|
peterv
:
review+
|
Details | Diff | Splinter Review |
8.70 KB,
patch
|
dveditz
:
approval1.9.2.14+
dveditz
:
approval1.9.1.17+
|
Details | Diff | Splinter Review |
3.26 KB,
patch
|
Details | Diff | Splinter Review |
No description provided.
Reporter | ||
Updated•14 years ago
|
Group: core-security
Reporter | ||
Comment 1•14 years ago
|
||
Reporter | ||
Comment 2•14 years ago
|
||
Crash address 0xfffffffffffffff8 is kinda scary.
Comment 3•14 years ago
|
||
439 NS_IF_RELEASE(mTemplateRules[mTemplateRuleCount].mModeLocalName);
mTemplateRuleCount is -1.
The popTemplateRule call is coming from end()... but we never called pushTemplateRule, because we bailed out from init() like so:
169 NS_ENSURE_TRUE(document, NS_ERROR_FAILURE);
and the caller in txMozillaXSLTProcessor::TransformToDoc didn't check the rv and pressed on.
Assignee | ||
Updated•14 years ago
|
Whiteboard: [sg:critical?]
Assignee | ||
Updated•14 years ago
|
Assignee: nobody → jonas
blocking2.0: --- → final+
Comment 4•14 years ago
|
||
Jonas, progress here?
Comment 5•14 years ago
|
||
Jonas?
Assignee | ||
Comment 6•14 years ago
|
||
I'll start looking at this today
Assignee | ||
Comment 7•14 years ago
|
||
Our error handling here is way busted. We even ignore errors generated from txExecutionState.init.
This patch makes us honor that error, and skips the template rule cleanup when the transformation failed for any reason. Instead template rules are properly owned by an nsTArray which simplifies things a lot.
Attachment #492934 -
Flags: review?(peterv)
Comment 8•14 years ago
|
||
Comment on attachment 492934 [details] [diff] [review]
Patch to fix
>+ var docType = document.implementation.createDocumentType(undefined, '', '');
>+ var doc = document.implementation.createDocument('', '', null);
>+ var xp = new XSLTProcessor;
>+ xp.importStylesheet(doc);
>+ xp.transformToDocument(docType);
>+}
>+catch (ex) {}
>+
>+try {
>+ var docType = document.implementation.createDocumentType(undefined, '', '');
>+ var doc = document.implementation.createDocument('', '', null);
>+ var xp = new XSLTProcessor;
Don't think you need the |var|s again here.
> nsresult
This should be void now, it only returns NS_OK.
> txExecutionState::pushTemplateRule(txStylesheet::ImportFrame* aFrame,
Attachment #492934 -
Flags: review?(peterv) → review+
Assignee | ||
Comment 9•14 years ago
|
||
Status: NEW → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
Comment 10•14 years ago
|
||
This crashes 3.6.x too
Updated•14 years ago
|
blocking1.9.1: ? → .17+
blocking1.9.2: ? → .14+
Comment 11•14 years ago
|
||
Blocking branch releases, please work up a back-ported patch if necessary
Assignee | ||
Updated•14 years ago
|
Attachment #492934 -
Flags: approval1.9.2.14?
Attachment #492934 -
Flags: approval1.9.1.17?
Comment 12•14 years ago
|
||
Comment on attachment 492934 [details] [diff] [review]
Patch to fix
>- TemplateRule* mTemplateRules;
>- PRInt32 mTemplateRulesBufferSize;
>- PRInt32 mTemplateRuleCount;
>+ AutoInfallibleTArray<TemplateRule, 10> mTemplateRules;
Neither branch has AutoInfallibleTArray. Did this compile in your tree?
Assignee | ||
Comment 13•14 years ago
|
||
No, that was the only change I had to make (which also meant returning OOM as needed)
Assignee | ||
Comment 14•14 years ago
|
||
Attachment #505007 -
Flags: approval1.9.2.14?
Attachment #505007 -
Flags: approval1.9.1.17?
Assignee | ||
Updated•14 years ago
|
Attachment #492934 -
Flags: approval1.9.2.14?
Attachment #492934 -
Flags: approval1.9.1.17?
Assignee | ||
Comment 15•14 years ago
|
||
forgot to refresh
Attachment #505007 -
Attachment is obsolete: true
Attachment #505009 -
Flags: approval1.9.2.14?
Attachment #505009 -
Flags: approval1.9.1.17?
Attachment #505007 -
Flags: approval1.9.2.14?
Attachment #505007 -
Flags: approval1.9.1.17?
Comment 16•14 years ago
|
||
Comment on attachment 505009 [details] [diff] [review]
branch patch
Approved for 1.9.2.14 and 1.9.1.17, a=dveditz
Attachment #505009 -
Flags: approval1.9.2.14?
Attachment #505009 -
Flags: approval1.9.2.14+
Attachment #505009 -
Flags: approval1.9.1.17?
Attachment #505009 -
Flags: approval1.9.1.17+
Assignee | ||
Comment 17•14 years ago
|
||
Assignee | ||
Comment 18•14 years ago
|
||
Somehow missed part of the patch when moving it to the 1.9.1 branch. Followup landed (this is in the approved patch above):
http://hg.mozilla.org/releases/mozilla-1.9.1/rev/7f3448d65808
Comment 19•14 years ago
|
||
Verified fixed for 1.9.2 with Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US; rv:1.9.2.14pre) Gecko/20110120 Namoroka/3.6.14pre. Verified crash in 1.9.2.13.
Verified fixed for 1.9.1 with Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US; rv:1.9.1.17pre) Gecko/20110120 Shiretoko/3.5.17pre. Verified crash in 1.9.1.16.
Keywords: verified1.9.1,
verified1.9.2
Comment 20•14 years ago
|
||
Updated•14 years ago
|
Group: core-security
Updated•13 years ago
|
Crash Signature: [@ txExecutionState::popTemplateRule]
You need to log in
before you can comment on or make changes to this bug.
Description
•