20
849
Fork
You've already forked fuzzel
83

🐛 Fix memory leak with font_bold #617

Manually merged
markstos merged 1 commit from fix-memory-leak into master 2025年07月13日 06:48:42 +02:00
Collaborator
Copy link

I found this issue with address sanitizer, when normally opening this app and then exiting. It looked like this:

Direct leak of 142848 byte(s) in 186 object(s) allocated from:
#0 0x7fc76531fba5 in realloc /usr/src/debug/gcc/gcc/libsanitizer/asan/asan_malloc_linux.cpp:81
#1 0x7fc76513376c (/usr/lib/libfontconfig.so.1+0x3376c) (BuildId: 9ce6a06434d9a60bc1e842b1864019934fb47967)
#2 0x7fc7651340da (/usr/lib/libfontconfig.so.1+0x340da) (BuildId: 9ce6a06434d9a60bc1e842b1864019934fb47967)
#3 0x7fc76512b3a5 in FcFontRenderPrepare (/usr/lib/libfontconfig.so.1+0x2b3a5) (BuildId: 9ce6a06434d9a60bc1e842b1864019934fb47967)
#4 0x7fc764ebdf80 in fcft_from_name2 (/usr/lib/libfcft.so.4+0x8f80) (BuildId: decd7a4e67b91c4abef55bb41b486264bb695043)
#5 0x55c49792a6d6 in reload_font ../wayland.c:1588
#6 0x55c49792adfa in update_size ../wayland.c:1645
#7 0x55c497931ca1 in surface_enter ../wayland.c:2527
#8 0x7fc763bc8ac5 (/usr/lib/libffi.so.8+0x7ac5) (BuildId: 02fec367864097384b082accc299b6e74c83454b)

After the fix, I get no complaints.

I found this issue with address sanitizer, when normally opening this app and then exiting. It looked like this: > Direct leak of 142848 byte(s) in 186 object(s) allocated from: #0 0x7fc76531fba5 in realloc /usr/src/debug/gcc/gcc/libsanitizer/asan/asan_malloc_linux.cpp:81 #1 0x7fc76513376c (/usr/lib/libfontconfig.so.1+0x3376c) (BuildId: 9ce6a06434d9a60bc1e842b1864019934fb47967) #2 0x7fc7651340da (/usr/lib/libfontconfig.so.1+0x340da) (BuildId: 9ce6a06434d9a60bc1e842b1864019934fb47967) #3 0x7fc76512b3a5 in FcFontRenderPrepare (/usr/lib/libfontconfig.so.1+0x2b3a5) (BuildId: 9ce6a06434d9a60bc1e842b1864019934fb47967) #4 0x7fc764ebdf80 in fcft_from_name2 (/usr/lib/libfcft.so.4+0x8f80) (BuildId: decd7a4e67b91c4abef55bb41b486264bb695043) #5 0x55c49792a6d6 in reload_font ../wayland.c:1588 #6 0x55c49792adfa in update_size ../wayland.c:1645 #7 0x55c497931ca1 in surface_enter ../wayland.c:2527 #8 0x7fc763bc8ac5 (/usr/lib/libffi.so.8+0x7ac5) (BuildId: 02fec367864097384b082accc299b6e74c83454b) After the fix, I get no complaints.
dnkl force-pushed fix-memory-leak from 6a792f0f56
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
builds.sr.ht/freebsd-x64 Job completed
ci/woodpecker/pr/woodpecker Pipeline was successful
to 6fd584b0ff
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
ci/woodpecker/pull_request_closed/woodpecker Pipeline was successful
builds.sr.ht/freebsd-x64 Job completed
ci/woodpecker/pr/woodpecker Pipeline was successful
2025年07月13日 06:48:27 +02:00
Compare
markstos manually merged commit 6fd584b0ff into master 2025年07月13日 06:48:42 +02:00
Owner
Copy link

Nice catch, thanks!

Nice catch, thanks!
Sign in to join this conversation.
No reviewers
Milestone
Clear milestone
No items
No milestone
Projects
Clear projects
No items
No project
Assignees
Clear assignees
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
dnkl/fuzzel!617
Reference in a new issue
dnkl/fuzzel
No description provided.
Delete branch "fix-memory-leak"

Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?