Summary: | Attached PDF crashes evince with a Floating point exception | ||
---|---|---|---|
Product: | pixman | Reporter: | Carlos Garcia Campos <carlosgc> |
Component: | pixman | Assignee: | Søren Sandmann Pedersen <soren.sandmann> |
Status: | RESOLVED FIXED | QA Contact: | Søren Sandmann Pedersen <soren.sandmann> |
Severity: | normal | ||
Priority: | medium | CC: | charles-debian-nospam, chris, joss, mariano.suarezalvarez, pablo |
Version: | 0.14.0 | ||
Hardware: | Other | ||
OS: | All | ||
Whiteboard: | |||
i915 platform: | i915 features: |
Description
Carlos Garcia Campos
2009-10-23 06:14:59 UTC
The issue is that the src is a 0x0R and so triggers the FPE due to a modulus 0. I can filter this out at cairo, and so cheaply skip the entire operation. Maybe pixman should defend itself as well? commit 1c34249b7e874cceca29d76af224ee274b880907 Author: Chris Wilson <chris@chris-wilson.co.uk> Date: Fri Oct 23 14:42:48 2009 +0100 [pattern] Compute zero extents for empty patterns If the pattern is for example a repeating 0x0 image, then treat it as having zero extents. This should workaround the bug presented here: https://bugs.freedesktop.org/show_bug.cgi?id=24693 Attached PDF crashes evince with a Floating point exception Søren is there anything else you want to do here? Pixman has so far taken the attitude that sanity checking is the users's responsibility and that incorrect input will lead to unpredictable behavior. I'd certainly want to avoid sprinkling checks for zero all over the place. Does cairo generate zero sized images often, and how difficult would it be make it not do that? I notice this old commit commit b4f0cc6eeaff8d5ea114734fcfa293fce1904ce4 Author: Chris Wilson <chris@chris-wilson.co.uk> Date: Thu Sep 27 12:44:44 2007 +0100 [pixman-image] Avoid a potential malloc(0). Do not attempt to allocate bits if either the image width or height is 0 - Cairo has a habit of attempting to create such surfaces when generating glyphs. The malloc(0) may return a NULL pointer and be treated as an out-of-memory error. which seems to indicate that cairo *does* generate them. Chris, any comments on this? Hi, For what it's worth, there is another file that crashes here: http://www.cli.di.unipi.it/doku/lib/exe/fetch.php/lpr-a/06-tcp-streamsockets.pdf Cheers, Pablo. (In reply to comment #4) > Chris, any comments on this? My apologies Søren, it appears that I've convinced bugs.fd.o not to email me anymore. Hopefully addressed now. Cairo does use 0x0 images as placeholders. In theory, Cairo detects the use of such surfaces and eliminates the operation - so I'm happy that the burden of this sanity checking lies with Cairo and to attempt to use such surface with pixman resulting in a bug. *** Bug 25751 has been marked as a duplicate of this bug. *** *** Bug 26784 has been marked as a duplicate of this bug. *** |
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.