Closed
Bug 1724795
Opened 3 years ago
Closed 3 years ago
LeakSanitizer: [@ _cairo_array_grow_by]
Categories
(Core :: Graphics: Text, defect)
Core
Graphics: Text
Tracking
()
RESOLVED
FIXED
93 Branch
People
(Reporter: tsmith, Assigned: jfkthame)
References
(Blocks 2 open bugs)
Details
(Keywords: memory-leak, testcase)
Attachments
(2 files)
Found while fuzzing m-c 20210609-662aa4502f55 (--enable-address-sanitizer --enable-fuzzing)
To help catch this issue ASAN_OPTIONS=detect_leaks=1
was used.
Direct leak of 768 byte(s) in 1 object(s) allocated from:
#0 0x55dc23641289 in realloc /builds/worker/fetches/llvm-project/llvm/projects/compiler-rt/lib/asan/asan_malloc_linux.cpp:164:3
#1 0x48594f52ce6a in _cairo_array_grow_by /gecko/gfx/cairo/cairo/src/cairo-array.c:115:20
#2 0x48594f52d621 in _cairo_array_allocate /gecko/gfx/cairo/cairo/src/cairo-array.c:317:14
#3 0x48594f52d4b2 in _cairo_array_append_multiple /gecko/gfx/cairo/cairo/src/cairo-array.c:288:14
#4 0x48594f52d3c1 in _cairo_array_append /gecko/gfx/cairo/cairo/src/cairo-array.c:265:12
#5 0x48594f364a69 in cff_index_read /gecko/gfx/cairo/cairo/src/cairo-cff-subset.c:438:22
#6 0x48594f36f2fd in cairo_cff_font_read_cid_fontdict /gecko/gfx/cairo/cairo/src/cairo-cff-subset.c:1020:14
#7 0x48594f36c404 in cairo_cff_font_read_top_dict /gecko/gfx/cairo/cairo/src/cairo-cff-subset.c:1230:18
#8 0x48594f36a4e3 in cairo_cff_font_read_font /gecko/gfx/cairo/cairo/src/cairo-cff-subset.c:1349:18
#9 0x48594f36246f in cairo_cff_font_generate /gecko/gfx/cairo/cairo/src/cairo-cff-subset.c:2581:14
#10 0x48594f36045d in _cairo_cff_subset_init /gecko/gfx/cairo/cairo/src/cairo-cff-subset.c:2973:14
#11 0x48594f427c99 in _cairo_pdf_surface_emit_cff_font_subset /gecko/gfx/cairo/cairo/src/cairo-pdf-surface.c:5903:14
#12 0x48594f4272c4 in _cairo_pdf_surface_emit_unscaled_font_subset /gecko/gfx/cairo/cairo/src/cairo-pdf-surface.c:6618:14
#13 0x48594f669ca2 in _cairo_sub_font_collect /gecko/gfx/cairo/cairo/src/cairo-scaled-font-subsets.c:741:30
#14 0x48594f636736 in _cairo_scaled_font_subsets_foreach_internal /gecko/gfx/cairo/cairo/src/cairo-scaled-font-subsets.c:1062:6
#15 0x48594f636986 in _cairo_scaled_font_subsets_foreach_unscaled /gecko/gfx/cairo/cairo/src/cairo-scaled-font-subsets.c:1090:12
#16 0x48594f3fe29b in _cairo_pdf_surface_emit_font_subsets /gecko/gfx/cairo/cairo/src/cairo-pdf-surface.c:6668:14
#17 0x48594f3f7060 in _cairo_pdf_surface_finish /gecko/gfx/cairo/cairo/src/cairo-pdf-surface.c:2450:11
#18 0x48594f67f41c in _cairo_surface_finish /gecko/gfx/cairo/cairo/src/cairo-surface.c:1034:11
#19 0x48594f67dfd0 in _moz_cairo_surface_finish /gecko/gfx/cairo/cairo/src/cairo-surface.c:1083:5
Objects leaked above:
0x6170003d1a00 (768 bytes)
Flags: in-testsuite?
Reporter | ||
Comment 1•3 years ago
|
||
A Pernosco session is available here: https://pernos.co/debug/qbq9Fg6Sn5FjOTST9Jw8OA/index.html
Comment 2•3 years ago
|
||
Probably from the cairo update? Jonathan feel free to ni? back if you don't have cycles for this and I can look.
Flags: needinfo?(jfkthame)
Comment 3•3 years ago
|
||
For context here, Tyson has only recently started fuzzing for leaks, so it isn't necessarily a regression.
Looking at the test case, it seems like we're hitting some issue when we try to print a specific character.
Component: Graphics → Graphics: Text
Assignee | ||
Comment 4•3 years ago
|
||
This is already fixed upstream in https://gitlab.freedesktop.org/cairo/cairo/-/merge_requests/192; we should simply take that fix. I'll post a patch.
Flags: needinfo?(jfkthame)
Assignee | ||
Comment 5•3 years ago
|
||
Updated•3 years ago
|
Assignee: nobody → jfkthame
Status: NEW → ASSIGNED
Pushed by jkew@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/c68e5e639d01
Fix leak in cairo-cff-subset (patch from https://gitlab.freedesktop.org/cairo/cairo/-/merge_requests/192, already merged upstream). r=jrmuizel
Comment 7•3 years ago
|
||
bugherder |
Status: ASSIGNED → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 93 Branch
Updated•3 years ago
|
status-firefox91:
--- → wontfix
status-firefox-esr78:
--- → wontfix
status-firefox-esr91:
--- → wontfix
Keywords: memory-leak
Updated•3 years ago
|
Flags: in-testsuite? → in-testsuite-
You need to log in
before you can comment on or make changes to this bug.
Description
•