Bug 13372 - SIGFPE in fbcompose.c
Summary: SIGFPE in fbcompose.c
Status: RESOLVED FIXED
Alias: None
Product: cairo
Classification: Unclassified
Component: general (show other bugs)
Version: 1.4.10
Hardware: Other Linux (All)
: medium normal
Assignee: Carl Worth
QA Contact: cairo-bugs mailing list
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-11-23 16:33 UTC by David
Modified: 2008-10-10 07:01 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
An image that crashes Cairo (10.15 KB, image/svg+xml)
2007-11-23 16:33 UTC, David
Details
GDB output (1.84 KB, text/plain)
2007-11-23 16:34 UTC, David
Details

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.