Closed Bug 463561 Opened 13 years ago Closed 12 years ago
mkdepend crashes while compiling freetype
It also crashes when compiling other sources that include freetype headers. For some reason we're dividing by zero when parsing some macros.
instead of dividing by zero, set the result to the largest integer it can hold
What file is being compiled when mkdepend crashes? I'm a little leery of changing the mkdepend sources independently, since I'm pretty certain it is a straight import of external code (FreeBSD stuff, perhaps?)
CVS logs say it's from X11, but they also say we've taken local patches: http://bonsai.mozilla.org/cvslog.cgi?file=mozilla/config/mkdepend/main.c&rev=HEAD&mark=3.7
It appears to crash anywhere ftconfig.h is included, while evaluating "FT_SIZEOF_INT (32 / FT_CHAR_BIT)." So there are two bugs here. First being FT_CHAR_BIT is defined to be 0, which is wrong. It appears to expect CHAR_BIT to be defined in <limits.h> /* `CHAR_BIT' (defined in limits.h) gives the number of bits in a */ /* `char' type. */ #ifndef FT_CHAR_BIT #define FT_CHAR_BIT CHAR_BIT #endif The second problem being that mkdepend crashes when it encounters this, giving no useful error message.
Comment on attachment 346839 [details] [diff] [review] fixes the crash Yeah, I don't think this is the right solution.
Attachment #346839 - Flags: review?(benjamin) → review-
Without this patch (and just using the CHAR_BIT=8 patch in Makefile.in), i continue to crash when building cairo.
Attachment #346839 - Flags: review- → review?(benjamin)
Comment on attachment 346839 [details] [diff] [review] fixes the crash Benjamin, what do you think the right solution is?
I think the right solution is for mkdepend to report an error if you try to divide by zero.
Comment on attachment 358419 [details] [diff] [review] throws an error for division by zero a191=beltzner
Attachment #358419 - Flags: approval1.9.1+
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
follow up push http://hg.mozilla.org/mozilla-central/rev/561fa10a7d71
Why hasn't this landed on branch yet?
pushed http://hg.mozilla.org/releases/mozilla-1.9.1/rev/b146d68c0718 and http://hg.mozilla.org/releases/mozilla-1.9.1/rev/be85c97ff23f
You need to log in before you can comment on or make changes to this bug.