409 BOX *prevRects = reg->rects; (gdb) n 411 extents = ®->extents; (gdb) n 413 numRects = ((numFullPtBlocks * NUMPTSTOBUFFER) + iCurPtBlock) >> 1; (gdb) n 415 if (!(reg->rects = (BOX *)Xrealloc((char *)reg->rects, (gdb) n 417 Xfree(prevRects); (gdb) n *** glibc detected *** double free or corruption (fasttop): 0x0829b3d8 *** Program received signal SIGABRT, Aborted. 0xffffe410 in __kernel_vsyscall () (gdb) bt #0 0xffffe410 in __kernel_vsyscall () #1 0xb6d769b1 in raise () from /lib/tls/i686/cmov/libc.so.6 #2 0xb6d782c9 in abort () from /lib/tls/i686/cmov/libc.so.6 #3 0xb6daa6ea in __fsetlocking () from /lib/tls/i686/cmov/libc.so.6 #4 0xb6db0f54 in malloc_trim () from /lib/tls/i686/cmov/libc.so.6 #5 0xb6db12ca in free () from /lib/tls/i686/cmov/libc.so.6 #6 0xb708fcaf in XPolygonRegion (Pts=0xbfb5d9c8, Count=6, rule=1) at ../../src/PolyReg.c:417 #7 0xb57b4f17 in X11SalGraphics::drawPolyPolygon () from /opt/openoffice.org2.0/program/libvclplug_gen680li.so #8 0xb7e00b77 in SalGraphics::DrawPolyPolygon () from /opt/openoffice.org2.0/program/libvcl680li.so #9 0xb7d8c0dd in OutputDevice::GetPixelOffset () from /opt/openoffice.org2.0/program/libvcl680li.so #10 0xb7d8e70d in OutputDevice::DrawPolyPolygon () from /opt/openoffice.org2.0/program/libvcl680li.so #11 0xb7d793ea in MetaPolyPolygonAction::Execute () from /opt/openoffice.org2.0/program/libvcl680li.so #12 0xb7d52d48 in GDIMetaFile::Play () from /opt/openoffice.org2.0/program/libvcl680li.so #13 0xb7d52f64 in GDIMetaFile::Play () from /opt/openoffice.org2.0/program/libvcl680li.so #14 0xb0cdf21c in GraphicManager::ImplDraw () from /opt/openoffice.org2.0/program/libgo680li.so #15 0xb0cdf536 in GraphicManager::ImplCreateOutput () from /opt/openoffice.org2.0/program/libgo680li.so #16 0xb0cdf758 in GraphicManager::ImplDraw () from /opt/openoffice.org2.0/program/libgo680li.so #17 0xb0cdfa27 in GraphicManager::DrawObj () from /opt/openoffice.org2.0/program/libgo680li.so #18 0xb0cd953d in GraphicObject::Draw () from /opt/openoffice.org2.0/program/libgo680li.so #19 0xb1635f5c in SdrGrafObj::DrawGraphic () from /opt/openoffice.org2.0/program/libsvx680li.so #20 0xb16384e9 in SdrGrafObj::DoPaintObject () from /opt/openoffice.org2.0/program/libsvx680li.so #21 0xb15e5da7 in sdr::contact::ViewContactOfSdrObj::PaintObject () from /opt/openoffice.org2.0/program/libsvx680li.so #22 0xb15ea9ea in sdr::contact::ViewContactOfPageObj::ActionChanged () from /opt/openoffice.org2.0/program/libsvx680li.so #23 0xb15ec868 in sdr::contact::ViewObjectContact::PaintObject () from /opt/openoffice.org2.0/program/libsvx680li.so #24 0xaed4ba4a in component_getDescriptionFunc () from /opt/openoffice.org2.0/program/libsd680li.so #25 0xb15ecc17 in sdr::contact::ViewObjectContact::PaintObjectHierarchy () from /opt/openoffice.org2.0/program/libsvx680li.so #26 0xb15eccb3 in sdr::contact::ViewObjectContact::PaintDrawHierarchy () from /opt/openoffice.org2.0/program/libsvx680li.so #27 0xb15ecc30 in sdr::contact::ViewObjectContact::PaintObjectHierarchy () from /opt/openoffice.org2.0/program/libsvx680li.so #28 0xb15ebc72 in sdr::contact::ObjectContactOfObjListPainter::ObjectContactOfObjListPainter () from /opt/openoffice.org2.0/program/libsvx680li.so #29 0xb15ec04b in sdr::contact::ObjectContactOfObjListPainter::ObjectContactOfObjListPainter () from /opt/openoffice.org2.0/program/libsvx680li.so #30 0xb16bc82f in SdrPageViewWindow::Redraw () from /opt/openoffice.org2.0/program/libsvx680li.so #31 0xb16c10cd in SdrPageView::CompleteRedraw () from /opt/openoffice.org2.0/program/libsvx680li.so #32 0xb16c4dd2 in SdrPaintView::CompleteRedraw () from /opt/openoffice.org2.0/program/libsvx680li.so #33 0xaed4baf2 in component_getDescriptionFunc () from /opt/openoffice.org2.0/program/libsd680li.so #34 0xaed93519 in sd::ViewShell::GetDocSh () from /opt/openoffice.org2.0/program/libsd680li.so #35 0xaef9cc5f in component_getFactory () from /opt/openoffice.org2.0/program/libsd680li.so #36 0xaef9d31f in component_getFactory () from /opt/openoffice.org2.0/program/libsd680li.so #37 0xaefd4a05 in component_getFactory () from /opt/openoffice.org2.0/program/libsd680li.so #38 0xaefd52d7 in component_getFactory () from /opt/openoffice.org2.0/program/libsd680li.so #39 0xaefd52ec in component_getFactory () from /opt/openoffice.org2.0/program/libsd680li.so #40 0xb7d20939 in Timer::Timeout () from /opt/openoffice.org2.0/program/libvcl680li.so #41 0xb7d20583 in SVMain () from /opt/openoffice.org2.0/program/libvcl680li.so #42 0xb57ce147 in SalData::Timeout () from /opt/openoffice.org2.0/program/libvclplug_gen680li.so #43 0xb57cd91b in SalXLib::CheckTimeout () from /opt/openoffice.org2.0/program/libvclplug_gen680li.so #44 0xb57cdb95 in SalXLib::Yield () from /opt/openoffice.org2.0/program/libvclplug_gen680li.so ---Type to continue, or q to quit--- #45 0xb57d564f in X11SalInstance::Yield () from /opt/openoffice.org2.0/program/libvclplug_gen680li.so #46 0xb7d1b36a in Application::Yield () from /opt/openoffice.org2.0/program/libvcl680li.so #47 0xb13bdd68 in PointToTwips () from /opt/openoffice.org2.0/program/libsvx680li.so #48 0xb13bdef0 in PointToTwips () from /opt/openoffice.org2.0/program/libsvx680li.so #49 0xb13bdef0 in PointToTwips () from /opt/openoffice.org2.0/program/libsvx680li.so #50 0xb13b98c7 in PointToTwips () from /opt/openoffice.org2.0/program/libsvx680li.so #51 0xb153809b in SvxUnoDashTable_createInstance () from /opt/openoffice.org2.0/program/libsvx680li.so #52 0xb1538192 in SvxUnoDashTable_createInstance () from /opt/openoffice.org2.0/program/libsvx680li.so #53 0x0806240f in desktop::impl_callRecoveryUI () #54 0x08063532 in desktop::Desktop::OpenClients () #55 0x080641e1 in desktop::Desktop::OpenClients_Impl () #56 0xb7ea86b9 in WaitObject::~WaitObject () from /opt/openoffice.org2.0/program/libvcl680li.so #57 0xb57d3b68 in SalDisplay::DispatchInternalEvent () from /opt/openoffice.org2.0/program/libvclplug_gen680li.so #58 0xb57d3b97 in SalX11Display::Yield () from /opt/openoffice.org2.0/program/libvclplug_gen680li.so #59 0xb57ce979 in SalDisplay::BestVisual () from /opt/openoffice.org2.0/program/libvclplug_gen680li.so #60 0xb57cdaef in SalXLib::Yield () from /opt/openoffice.org2.0/program/libvclplug_gen680li.so #61 0xb57d564f in X11SalInstance::Yield () from /opt/openoffice.org2.0/program/libvclplug_gen680li.so #62 0xb7d1b36a in Application::Yield () from /opt/openoffice.org2.0/program/libvcl680li.so #63 0xb7d1b3ad in Application::Execute () from /opt/openoffice.org2.0/program/libvcl680li.so #64 0x08067abb in desktop::Desktop::Main () #65 0xb7d20253 in DeInitVCL () from /opt/openoffice.org2.0/program/libvcl680li.so #66 0xb7d2039b in SVMain () from /opt/openoffice.org2.0/program/libvcl680li.so #67 0x0805e13b in sal_main () #68 0xb6d62ea2 in __libc_start_main () from /lib/tls/i686/cmov/libc.so.6 #69 0x0805e021 in _start () (gdb) PolyReg.C -- part of the file /* * Create an array of rectangles from a list of points. * If indeed these things (POINTS, RECTS) are the same, * then this proc is still needed, because it allocates * storage for the array, which was allocated on the * stack by the calling procedure. * */ static int PtsToRegion( register int numFullPtBlocks, register int iCurPtBlock, POINTBLOCK *FirstPtBlock, REGION *reg) { register BOX *rects; register XPoint *pts; register POINTBLOCK *CurPtBlock; register int i; register BOX *extents; register int numRects; BOX *prevRects = reg->rects; extents = ®->extents; numRects = ((numFullPtBlocks * NUMPTSTOBUFFER) + iCurPtBlock) >> 1; if (!(reg->rects = (BOX *)Xrealloc((char *)reg->rects, (unsigned) (sizeof(BOX) * numRects)))) { Xfree(prevRects); return(0); } .....