Discussion:
[gs-bugs] [Bug 698826] - MuPDF - Memory leak when rendering document with annotation
b***@artifex.com
2017-12-19 23:01:50 UTC
Permalink
http://bugs.ghostscript.com/show_bug.cgi?id=698826

Bug ID: 698826
Summary: Memory leak when rendering document with annotation
Product: MuPDF
Version: master
Hardware: PC
OS: Linux
Status: UNCONFIRMED
Severity: normal
Priority: P4
Component: mupdf
Assignee: mupdf-***@artifex.com
Reporter: ***@hotmail.com
QA Contact: gs-***@ghostscript.com
Word Size: ---

After having resolved 698825 rendering
http://www.pdfill.com/example/pdf_commenting_new.pdf using "mutool draw -s t
pdf_commenting_new.pdf 4" this triggers an ASAN complaint as quoted below.
Valgrind complains similarly.

==20629==ERROR: LeakSanitizer: detected memory leaks

Direct leak of 80 byte(s) in 20 object(s) allocated from:
#0 0x7fd37ce32c20 in __interceptor_malloc
(/usr/lib/x86_64-linux-gnu/libasan.so.4+0xd9c20)
#1 0x558df30f4e9d in fz_malloc_default source/fitz/memory.c:227
#2 0x558df30f405d in do_scavenging_malloc source/fitz/memory.c:22
#3 0x558df30f4388 in fz_malloc source/fitz/memory.c:62
#4 0x558df30f4e01 in fz_strdup source/fitz/memory.c:209
#5 0x558df318e990 in pdf_parse_da source/pdf/pdf-appearance.c:109
#6 0x558df318f560 in get_font_info source/pdf/pdf-appearance.c:170
#7 0x558df31a5ccc in pdf_update_free_text_annot_appearance
source/pdf/pdf-appearance.c:2196
#8 0x558df31a9347 in pdf_update_appearance source/pdf/pdf-appearance.c:2515
#9 0x558df318d4b1 in pdf_load_annots source/pdf/pdf-annot.c:473
#10 0x558df3203469 in pdf_load_page source/pdf/pdf-page.c:1083
#11 0x558df302c05d in fz_load_page source/fitz/document.c:313
#12 0x558df2fba2e3 in drawpage source/tools/mudraw.c:1044
#13 0x558df2fbba3e in drawrange source/tools/mudraw.c:1209
#14 0x558df2fbfb9b in mudraw_main source/tools/mudraw.c:1921
#15 0x558df2fb30d0 in main source/tools/mutool.c:127
#16 0x7fd37c4a5560 in __libc_start_main
(/lib/x86_64-linux-gnu/libc.so.6+0x20560)
--
You are receiving this mail because:
You are the QA Contact for the bug.
b***@artifex.com
2017-12-19 23:05:32 UTC
Permalink
http://bugs.ghostscript.com/show_bug.cgi?id=698826

Sebastian Rasmussen <***@hotmail.com> changed:

What |Removed |Added
----------------------------------------------------------------------------
Assignee|mupdf-***@artifex.com |***@hotmail.com
Ever confirmed|0 |1
Status|UNCONFIRMED |AWAITING_REVIEW
URL| |http://www.pdfill.com/examp
| |le/pdf_commenting_new.pdf

--- Comment #1 from Sebastian Rasmussen <***@hotmail.com> ---
A proposed patch fixing this issue is available in
5e84be24c9cdec8e2822b37a9e979f0db10784e8
--
You are receiving this mail because:
You are the QA Contact for the bug.
b***@artifex.com
2017-12-20 13:34:26 UTC
Permalink
http://bugs.ghostscript.com/show_bug.cgi?id=698826

Sebastian Rasmussen <***@hotmail.com> changed:

What |Removed |Added
----------------------------------------------------------------------------
Status|AWAITING_REVIEW |RESOLVED
Resolution|--- |FIXED

--- Comment #2 from Sebastian Rasmussen <***@hotmail.com> ---
Fixed in

commit 5e84be24c9cdec8e2822b37a9e979f0db10784e8
Author: Sebastian Rasmussen <***@gmail.com>
Date: Tue Dec 19 23:41:53 2017 +0100

Bug 698826: Plug leak of font names when parsing appearance string.

Previously if a variable text annotation with a default appearance
string had multiple 'Tf' operators all but the last font name would
leak.
--
You are receiving this mail because:
You are the QA Contact for the bug.
Loading...