Summary: | Race in _cairo_toy_font_face_destroy | ||
---|---|---|---|
Product: | cairo | Reporter: | Weeble <clockworksaint> |
Component: | general | Assignee: | Chris Wilson <chris> |
Status: | RESOLVED FIXED | QA Contact: | cairo-bugs mailing list <cairo-bugs> |
Severity: | normal | ||
Priority: | medium | ||
Version: | 1.12.14 | ||
Hardware: | Other | ||
OS: | All | ||
Whiteboard: | |||
i915 platform: | i915 features: |
Description
Weeble
2013-09-17 14:13:12 UTC
commit 337ab1f8d9e29086bfb4001508b28835b41c6390 Author: Chris Wilson <chris@chris-wilson.co.uk> Date: Tue Sep 17 16:28:19 2013 +0100 font: Push the last reference dec into the backend->destroy() callback In order to close a race between locking the backend and resurrecting a font via the cache, we need to keep the font face alive until after we take the backend lock. Once we have that lock, we can drop our reference and test if that was the last. Otherwise we must abort the destroy(). This fixes the double-free exposed by multithreaded applications trying to create and destroy the same font concurrently. Reported-by: Weeble <clockworksaint@gmail.com> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=69470 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> |
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.