Summary: | FcStrCaseWalkerNext causes segfault with DUMA | ||
---|---|---|---|
Product: | fontconfig | Reporter: | Myckel Habets <myckel> |
Component: | library | Assignee: | Keith Packard <keithp> |
Status: | RESOLVED WONTFIX | QA Contact: | Behdad Esfahbod <freedesktop> |
Severity: | normal | ||
Priority: | medium | CC: | andris.zeila, bugs.freedesktop, freedesktop |
Version: | 2.6 | ||
Hardware: | x86 (IA32) | ||
OS: | Linux (All) | ||
Whiteboard: | |||
i915 platform: | i915 features: |
Description
Myckel Habets
2009-03-03 13:36:02 UTC
I had a headache some time ago trying to understand what's wrong. This happens when an unaligned memory address is returned by DUMA memory allocation functions. Because the lowest bit is set fonconfig interprets such pointers as offsets and processes them accordingly. As a workaround you can force duma memory alignment with DUMA_ALIGNMENT=2. This will ensure that no duma returned pointers will have lowest bit set. But it will make unprotected a single byte after allocations of odd number of bytes. Still although the reported segfault is 'false positive', using the lowest bit of memory pointers as a flag results in problems with various debugging tools. Well, malloc is supposed to returned aligned memory, so what DUMA is doing is a hack to begin with. But yes, I agree that what fontconfig is doing is also a hack. I don't see anything to fix here, but good to know what was going on. |
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.