Bug 18924 - Memory leak
Summary: Memory leak
Status: RESOLVED FIXED
Alias: None
Product: poppler
Classification: Unclassified
Component: general (show other bugs)
Version: unspecified
Hardware: Other All
: high major
Assignee: poppler-bugs
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-12-07 08:22 UTC by Ilya Gorenbein
Modified: 2008-12-07 08:59 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
Test file for memory leak detection (696.29 KB, application/pdf)
2008-12-07 08:22 UTC, Ilya Gorenbein
Details
Patch to the memory leak. (280 bytes, patch)
2008-12-07 08:24 UTC, Ilya Gorenbein
Details | Splinter Review

Description Ilya Gorenbein 2008-12-07 08:22:50 UTC
Created attachment 20868 [details]
Test file for memory leak detection

Hello,

We are using version poppler-0.10.1. Memory leak exist at 'Page' destruction. 'Dict' objects are not freed.
The following call stack shows memory leak:

==10949== 757 (200 direct, 557 indirect) bytes in 10 blocks are definitely lost in loss record 846 of 1,162
==10949==    at 0x401DB31: operator new(unsigned) (vg_replace_malloc.c:163)
==10949==    by 0x6116A45: Object::initDict(XRef*) (Object.cc:71)
==10949==    by 0x611D42A: Parser::getObj(Object*, unsigned char*, CryptAlgorithm, int, int, int) (Parser.cc:88)
==10949==    by 0x611D561: Parser::getObj(Object*, unsigned char*, CryptAlgorithm, int, int, int) (Parser.cc:101)
==10949==    by 0x612DE28: XRef::fetch(int, int, Object*) (XRef.cc:957)
==10949==    by 0x6116C3F: Object::fetch(XRef*, Object*) (Object.cc:120)
==10949==    by 0x60B8DB1: Array::get(int, Object*) (Array.cc:75)
==10949==    by 0x60B9D37: Catalog::readPageTree(Dict*, PageAttrs*, int, char*) (Object.h:273)
==10949==    by 0x60B9E6D: Catalog::readPageTree(Dict*, PageAttrs*, int, char*) (Catalog.cc:336)
==10949==    by 0x60BBC95: Catalog::Catalog(XRef*) (Catalog.cc:121)
==10949==    by 0x611DF7C: PDFDoc::setup(GooString*, GooString*) (PDFDoc.cc:233)
==10949==    by 0x611F064: PDFDoc::PDFDoc(BaseStream*, GooString*, GooString*, void*) (PDFDoc.cc:198)

Test file and patch are attached.

Regards,
Ilya Gorenbein
Comment 1 Ilya Gorenbein 2008-12-07 08:24:15 UTC
Created attachment 20869 [details] [review]
Patch to the memory leak.
Comment 2 Albert Astals Cid 2008-12-07 08:54:31 UTC
Thanks for the patch, I need your full name for the credits file
Comment 3 Ilya Gorenbein 2008-12-07 08:56:00 UTC
Ilya Gorenbein 
Software Developer
Finjan Software 
 
Tel: +972 (9) 8648200 (x.317) 
Email: igorenbein@finjan.com
Comment 4 Albert Astals Cid 2008-12-07 08:59:47 UTC
Just the name was enough :-D

Patch commited.


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.