Closed Bug 336119 Opened 18 years ago Closed 15 years ago

Lost out-of-memory error in source/xslt/txXSLTPatterns.cpp:56

Categories

(Core :: XSLT, defect)

1.8 Branch
defect
Not set
normal

Tracking

()

RESOLVED INCOMPLETE

People

(Reporter: vda, Unassigned)

Details

(Whiteboard: closeme 2009-06-26)

User-Agent:       Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8) Gecko/20060320 Firefox/1.5
Build Identifier: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8) Gecko/20060320 Firefox/1.5

nsresult txPattern::getSimplePatterns(txList& aList)
{
    aList.add(this);
    return NS_OK;
}

But add() may fail! See below:

nsresult txList::add(void* objPtr)
{
    return insertBefore(objPtr, 0);
}

nsresult txList::insertBefore(void* objPtr, ListItem* refItem)
{
    ListItem* item = new ListItem;
    NS_ENSURE_TRUE(item, NS_ERROR_OUT_OF_MEMORY);
...

add() fails if "new ListItem" fails, but getSimplePatterns() never reports that.

Reproducible: Always
source/xslt/txStylesheet.cpp:436

    txList simpleMatches;
    rv = aTemplate->mMatch->getSimplePatterns(simpleMatches);
    if (simpleMatches.get(0) == aTemplate->mMatch) {
        aTemplate->mMatch.forget();
    }

rv is never checked for error conditions.
Assignee: nobody → xslt
Component: General → XSLT
Product: Firefox → Core
QA Contact: general → keith
Version: unspecified → 1.8 Branch
And the problem is... ?
do you still see problem if you use current beta, latest version of all plugins (for example flash v10 - check using about:plugins), java (1.6_0_13), etc
started in safe mode
 https://support.mozilla.com/en-US/kb/Safe+Mode
- latest beta
 http://www.mozilla.com/en-US/firefox/all-beta.html
Whiteboard: closeme 2009-06-26
No reply, INCO. Please reopen if you still see this bug in Firefox 3.5 or later in Firefox safe mode (http://support.mozilla.com/en-US/kb/Safe+Mode) or a new Firefox profile (http://support.mozilla.com/en-US/kb/Profiles) with updated plugins.
Status: UNCONFIRMED → RESOLVED
Closed: 15 years ago
Resolution: --- → INCOMPLETE
You need to log in before you can comment on or make changes to this bug.