Eli Zaretskii writes: > So, if you prefer not to invest any time in investigating the font > marking code, let's wait for Dmitry to respond, and make the decision > when he does (or when we give up waiting). I guess I preferred to invest more time. I found and fixed the bug, and the patch is attached. The issue was that the compaction code wasn't checking all the right lisp objects for the marks. The font entities were storing a list of fonts, and this list had to be traversed, looking for the marks. See font_clear_cache() for a function that WAS traversing the full list. I'm certain there are more leaks here, but bug 21509 is now the main leaker with my current test case.