To comment on the following update, log in, then open the issue:
http://www.openoffice.org/issues/show_bug.cgi?id=81601
Issue #|81601
Summary|Leak coming from ParseCMAP
Component|porting
Version|680m228
Platform|All
URL|
OS/Version|All
Status|NEW
Status whiteboard|
Keywords|
Resolution|
Issue type|PATCH
Priority|P3
Subcomponent|MacOSX
Assigned to|hdu
Reported by|pjanik
------- Additional comments from [EMAIL PROTECTED] Sat Sep 15 12:12:03 +0000
2007 -------
Hi,
during testing, I found this leak:
Leak: 0x078ab600 size=1024 string '^A'
Call stack: [thread 3bab]: | 0x1 | start | start | main | SVMain() |
ImplSVMainHook(unsigned char*) |
Ru
nApplicationEventLoop | _AcquireNextEvent | ReceiveNextEventCommon |
RunCurrentEventLoopInMode
| CFRunLoopRunInM
ode | CFRunLoopRunSpecific | TimerVector |
MainRunLoopForThreadedApps(__EventLoopTimer*, void*)
| ImplSVMain() |
desktop::Desktop::Main() | 0x18de983c | component_getFactory |
svt::RoadmapWizard::RoadmapWizard[not-in-charge]
(Window*, ResId const&, unsigned long, ResId const&, unsigned char) |
svt::OWizardMachine::OWizardMachine[not-in
-charge](Window*, ResId const&, unsigned long, unsigned char, unsigned char,
short) |
WizardDialog::WizardDialog
[not-in-charge](Window*, ResId const&, unsigned char, short) |
ModalDialog::ModalDialog[not-in-
charge](Window*,
ResId const&) | Dialog::ImplInit(Window*, long long) |
Window::ImplInit(Window*, long long,
SystemParentData*) |
Window::ImplUpdateGlobalSettings(AllSettings&, unsigned char) |
Window::ImplCheckUIFont(Font
const&) | OutputDe
vice::HasGlyphs(Font const&, String const&, unsigned short, unsigned short)
const |
OutputDevice::GetFontCharMap
(FontCharMap&) const | AquaSalGraphics::GetImplFontCharMap() const |
ImplMacFontData::GetImplFontCharMap() const
| ParseCMAP(unsigned char const*, int, CmapResult&) | operator new[](unsigned
long) | operator new
(unsigned lon
g) | malloc
I put this at the end of ParseCMAP:
fprintf(stderr, "ParseCMAP allocated pCodePairs: %p\n", pCodePairs);
fprintf(stderr, "ParseCMAP allocated pStartGlyphs: %p\n", pStartGlyphs);
fprintf(stderr, "ParseCMAP, mnPairCount is %d\n", nRangeCount);
fprintf(stderr, "ParseCMAP returning true...\n");
and in this case, it printed:
paveljanik:~/Desktop/OpenOffice.org SRC680_m229.app/Contents/MacOS pavel$
./soffice.bin
soffice.bin(3170) malloc: recording stacks using standard recorder
config provider: true, config access: true
ParseCMAP allocated pCodePairs: 0x78aa600
ParseCMAP allocated pStartGlyphs: 0x78ab600
ParseCMAP, mnPairCount is 134
ParseCMAP returning true...
Thus in our case, we have leaked allocated pStartGlyphs.
Is this patch correct?
Index: aqua/source/gdi/salgdi.cxx
===============================================================
====
RCS file: /cvs/gsl/vcl/aqua/source/gdi/salgdi.cxx,v
retrieving revision 1.64
diff -u -r1.64 salgdi.cxx
--- aqua/source/gdi/salgdi.cxx 3 Aug 2007 14:02:18 -0000 1.64
+++ aqua/source/gdi/salgdi.cxx 15 Sep 2007 12:11:05 -0000
@@ -178,7 +178,7 @@
if( !ParseCMAP( &aBuffer[0], nRawLength, aCmapResult ) )
return mpCharMap;
- mpCharMap = new ImplFontCharMap( aCmapResult.mnPairCount,
aCmapResult.mpPairCodes );
+ mpCharMap = new ImplFontCharMap( aCmapResult.mnPairCount,
aCmapResult.mpPairCodes,
aCmapResult.mpStartGlyphs);
return mpCharMap;
}
---------------------------------------------------------------------
Please do not reply to this automatically generated notification from
Issue Tracker. Please log onto the website and enter your comments.
http://qa.openoffice.org/issue_handling/project_issues.html#notification
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]