Bug 19095 - Memory leak
Summary: Memory leak
Status: RESOLVED FIXED
Alias: None
Product: poppler
Classification: Unclassified
Component: general (show other bugs)
Version: unspecified
Hardware: Other Linux (All)
: medium normal
Assignee: poppler-bugs
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-12-15 06:13 UTC by Ilya Gorenbein
Modified: 2008-12-15 11:14 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
Test file 1 for memory leak detection (202.72 KB, application/pdf)
2008-12-15 06:13 UTC, Ilya Gorenbein
Details
Test file 2 for memory leak detection (26.29 KB, application/pdf)
2008-12-15 06:15 UTC, Ilya Gorenbein
Details
Patch to the memory leak problem (318 bytes, patch)
2008-12-15 06:15 UTC, Ilya Gorenbein
Details | Splinter Review

Description Ilya Gorenbein 2008-12-15 06:13:23 UTC
Created attachment 21172 [details]
Test file 1 for memory leak detection

Hello,

Memory leak exist both at versions poppler-0.10.1 and poppler-0.10.2. The leak is at 'AnnotScreen' destruction. 'action' and 'additionAction' objects are not freed. The following call stack shows memory leak:

==32038== 20 bytes in 1 blocks are definitely lost in loss record 210 of 1,177
==32038==    at 0x401DB31: operator new(unsigned) (vg_replace_malloc.c:163)
==32038==    by 0x6116A15: Object::initDict(XRef*) (Object.cc:71)
==32038==    by 0x611D43A: Parser::getObj(Object*, unsigned char*, CryptAlgorithm, int, int, int) (Parser.cc:88)
==32038==    by 0x611D571: Parser::getObj(Object*, unsigned char*, CryptAlgorithm, int, int, int) (Parser.cc:101)
==32038==    by 0x612DE38: XRef::fetch(int, int, Object*) (XRef.cc:957)
==32038==    by 0x6116C0F: Object::fetch(XRef*, Object*) (Object.cc:120)
==32038==    by 0x60B8DB1: Array::get(int, Object*) (Array.cc:75)
==32038==    by 0x60B84F4: Annots::Annots(XRef*, Catalog*, Object*) (Object.h:273)
==32038==    by 0x5F8B505: finjan::PDFDocument::displayPage(Page const&, bool, bool) const (PDFDocument.cpp:359)
==32038==    by 0x5F8C9DA: finjan::PDFHandler::displayPages(bool, bool) const (PDFHandler.cpp:132)
==32038==    by 0x5F8CCEA: finjan::PDFHandler::ParseDocument(short, finjan::Item_Context&, finjan::ITextProcessor*) (PDFHandler.cpp:97)



Test files and patch are attached. 
NOTE! To reproduce the bug, you should run the test with both test files (as set).

Regards,
Ilya Gorenbein
Comment 1 Ilya Gorenbein 2008-12-15 06:15:00 UTC
Created attachment 21173 [details]
Test file 2 for memory leak detection
Comment 2 Ilya Gorenbein 2008-12-15 06:15:45 UTC
Created attachment 21174 [details] [review]
Patch to the memory leak problem
Comment 3 Albert Astals Cid 2008-12-15 11:14:31 UTC
Patch commited, thanks.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.