It seems we're a pair that is badly needed for AbiWord. :-)

Uninitialized memory, free/delete mismatches and ... SEGV!

Reproduce by inserting a field "Seconds since the ep" (I don't know what the
rest of the string is, the listbox truncates. Insert another field
Application/File Name. Undo once.

Memory was allocated by the following call stack:

    new(UINT)      [new.cpp:23]
    pf_Frag_Object::pf_Frag_Object  [pf_Frag_Object.cpp:177]
    pt_PieceTable::_createObject    [pt_PT_InsertObject.cpp:154]
    pt_PieceTable::_insertObject    [pt_PT_InsertObject.cpp:180]
    pt_PieceTable::insertObject     [pt_PT_InsertObject.cpp:70]
    PD_Document::insertObject       [pd_Document.cpp:338]
    FV_View::cmdInsertField         [fv_View.cpp:7348]
    s_doField                       [ap_EditMethods.cpp:5628]
    ap_EditMethods::insField        [ap_EditMethods.cpp:5639]
    EV_Menu::invokeMenuMethod       [ev_Menu.cpp:201]



The call stack for the error where fd_Field::m_szValue is invalid, is:

    fd_Field::setValue                   [fd_Field.cpp:71]
    fp_FieldTimeEpochRun::calculateValue [fp_Run.cpp:2671]
    fl_BlockLayout::recalculateFields    [fl_BlockLayout.cpp:4415]
    fl_BlockLayout::format               [fl_BlockLayout.cpp:1239]
    fl_DocSectionLayout::updateLayout    [fl_SectionLayout.cpp:682]
    FL_DocLayout::updateLayout           [fl_DocLayout.cpp:583]
    fl_DocListener::signal               [fl_DocListener.cpp:1138]
    PD_Document::signalListeners         [pd_Document.cpp:542]
    FV_View::_generalUpdate              [fv_View.cpp:5182]
    FV_View::cmdUndo                     [fv_View.cpp:6854]
    ap_EditMethods::undo                 [ap_EditMethods.cpp:1810]


but then it was deleted before use by the following call stack:

    delete(void*)
    fd_Field::`scalar deleting destructor' [AbiWord.exe]
    pf_Frag_Object::~pf_Frag_Object [pf_Frag_Object.cpp:183]
    pf_Frag_Object::`vector deleting destructor' [AbiWord.exe]
    pt_PieceTable::_deleteObject    [pt_PT_DeleteObject.cpp:110]
    pt_PieceTable::_doTheDo         [pt_PT_Undo.cpp:285]
    pt_PieceTable::undoCmd          [pt_PT_Undo.cpp:461]
    PD_Document::undoCmd            [pd_Document.cpp:806]
    FV_View::cmdUndo                [fv_View.cpp:6849]
    ap_EditMethods::undo            [ap_EditMethods.cpp:1810]


- Bother, said Pooh

/Mike
P.S.
What kind of function name is "_doTheDo"?


Reply via email to