Bug 13372

Summary: SIGFPE in fbcompose.c
Product: cairo Reporter: David <neko18>
Component: generalAssignee: Carl Worth <cworth>
Status: RESOLVED FIXED QA Contact: cairo-bugs mailing list <cairo-bugs>
Severity: normal    
Priority: medium    
Version: 1.4.10   
Hardware: Other   
OS: Linux (All)   
Whiteboard:
i915 platform: i915 features:
Attachments: An image that crashes Cairo
GDB output

Description David 2007-11-23 16:33:11 UTC
When rendering a certain image (to be attached) with Cairo (under Eye of GNOME) I receive a SIGFPE/Arithmetic exception. I believe this is due to division by zero (specifically modular division by zero), but I could be wrong. I will attach the GDB output as well.
Comment 1 David 2007-11-23 16:33:48 UTC
Created attachment 12705 [details]
An image that crashes Cairo
Comment 2 David 2007-11-23 16:34:17 UTC
Created attachment 12706 [details]
GDB output
Comment 3 David 2007-11-23 17:02:39 UTC
I added this line to fbcompose.c right before the line that caused the SIGFPE:
printf("y1: %d, height: %d\n", y1, pict->pDrawable->height);

Here is the output I got (I installed the modified Cairo to /opt):
david@laptop:~/Desktop$ LD_LIBRARY_PATH=/opt/lib eog image.svg
y1: -29, height: 8
y1: -29, height: 8
y1: -29, height: 8
... Counts up to "y1: 88, height: 8" repeating each "y1" many, many times...
y1: 88, height: 8
y1: 88, height: 8
y1: 88, height: 8
y1: -1, height: 0
Floating point exception (core dumped)
david@laptop:~/Desktop$ 

I guess that means my division by zero guess is correct.
Comment 4 Behdad Esfahbod 2007-11-23 17:09:42 UTC
cairo version?
Comment 5 David 2007-11-23 17:23:40 UTC
1.4.10
Comment 6 Chris Wilson 2008-10-10 07:01:12 UTC
Checking the various paths through to the image surface, we should return early if we attempt to operate on a zero-sized image - so this bug appears fixed and is currently unreproducible.

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.