[Fontconfig] Issues with current cvs
plam at MIT.EDU
Tue Jan 24 18:37:51 PST 2006
Ronny V. Vindenes wrote:
> The valgrind output from cairo cvs is gigantic, so I haven't had the
> time to track them down, but I've attached the output of
> # valgrind --leak-check=full fc-cache -sfv > fc-cache-valgrind 2>&1
> Note the warnings about write()ing uninitialized buffers to the cache.
I think I've fixed the memory leaks. It would really help to give
valgrind output for a fontconfig with -g and -O0; as it is, I can't be
absolutely sure that I've fixed them. The uninitialized buffers are
harmless; what happens is the following:
malloc() allocates, say, 200 bytes.
write 50 bytes to the buffer
skip 20 bytes (e.g. for alignment reasons)
write 70 bytes to the buffer
so valgrind sees the 20 skipped bytes and complains. It would be nice
if valgrind didn't complain, but I don't have a straightforward
solution. Clearing the buffer ahead of time doesn't actually help,
because it gets copied from somewhere else. I'd have to find the source
of the copy to fix the problem.
More information about the Fontconfig