[evolution-patches] Re: [patch] another 64-bit bug-fix




David,

I'm curious, why does this lead to a crash?  That value is never used other than to test against zero, I can't see how it could cause a crash since the cast only changes the type size.

Thanks,
Michael

On Tue, 2004-12-14 at 18:36 -0800, David Mosberger wrote:
Hi Z,

I'm trying to get evolution on Debian/ia64 (unstable) to work and
while tracking down a crash there, I found that the underlying bug
still exists in the CVS tree.  I can't build the CVS tree easily at
the moment, but I hope you accept a verbal description of what needs
fixing.

What's wrong is that in e-data-cal-factor.c, there is one place where
a pointer is converted to "int" instead of GType, which of course
leads to instant crashes on 64-bit platforms.

In the CVS tree, the offending cast occurs in:

 e_data_cal_factory_register_backend()

Just look for the line:

 type = GPOINTER_TO_INT (g_hash_table_lookup (kinds, GINT_TO_POINTER (kind)));

and change it to:

 type = (GType) (g_hash_table_lookup (kinds, GINT_TO_POINTER (kind)));

and things will be fine.

Could this change be checked in?

Thanks!

	--david
--
Michael Zucchi <notzed ximian com>
"Ride, Work, Sleep. Beer."
Novell's Evolution and Free Software Developer


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]