After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 447163 - Implicit pointer conversion gdk_font_ref()
Implicit pointer conversion gdk_font_ref()
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: [obsolete] Backend: directfb
2.11.x
Other Linux
: Normal critical
: ---
Assigned To: gtk-bugs
Michael Emmel
Depends on:
Blocks:
 
 
Reported: 2007-06-13 14:53 UTC by Loïc Minier
Modified: 2007-06-14 06:39 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Ignore GDK_DISABLE_DEPRECATED to get gdk_font_ref() properly defined (416 bytes, patch)
2007-06-13 14:54 UTC, Loïc Minier
committed Details | Review

Description Loïc Minier 2007-06-13 14:53:12 UTC
Hi,

Dann Frazier reported in Debian bug http://bugs.debian.org/381082:
"""
Our automated buildd log filter[1] detected a problem that will cause
your package to segfault on architectures where the size of a pointer
is greater than the size of an integer, such as ia64 and amd64.

Looks like gdk_font_ref() is marked deprecated, so it shouldn't be
used with GDK_DISABLE_DEPRECATED defined.

[1]http://people.debian.org/~dannf/check-implicit-pointer-functions

----- Forwarded message from Debian/IA64 non-US Build Daemon
<buildd@caballero.debian.org> -----

Subject: Log for successful build of gtk+2.0_2.8.18-5 (dist=unstable)
From: Debian/IA64 non-US Build Daemon <buildd@caballero.debian.org>
Date: Mon, 31 Jul 2006 17:24:23 +0100
To: undisclosed-recipients: ;
X-PMX-Version: 5.1.2.240295, Antispam-Engine: 2.3.0.1, Antispam-Data:
2006.7.31.85932
X-Virus-Scanned: by amavisd-new-20030616-p10 (Debian) at ldl.fc.hp.com
X-Spam-Checker-Version: SpamAssassin 3.0.3 (2005-04-27) on ldl.lart
X-Spam-Level:
X-Spam-Status: No, score=-1.5 required=3.5 tests=AWL,BAYES_00,UNDISC_RECIPS,
        UPPERCASE_25_50 autolearn=no version=3.0.3
Debian-Buildd-Error: Yes

Function `gdk_font_ref' implicitly converted to pointer at gdkgc-directfb.c:204

----- End forwarded message -----
"""

I'm going to attach his patch.

Severity critical as this should cause crashes on amd64.

Bye,
Comment 1 Loïc Minier 2007-06-13 14:54:12 UTC
Created attachment 89885 [details] [review]
Ignore GDK_DISABLE_DEPRECATED to get gdk_font_ref() properly defined
Comment 2 Behdad Esfahbod 2007-06-13 21:24:15 UTC
2007-06-13  Behdad Esfahbod  <behdad@gnome.org>

        * gdk/directfb/gdkgc-directfb.c: #undef GDK_DISABLE_DEPRECATED to
        get prototype for gdk_font_ref(). (#447163, Dann Frazier, Loïc Minier)

Comment 3 Michael Emmel 2007-06-14 01:48:49 UTC
This does not seem right to me ?

I looked at the change why do I have to call a deprecated function ?
I'm not clear what a replacement would be at the moment.
Comment 4 Behdad Esfahbod 2007-06-14 05:26:34 UTC
(In reply to comment #3)
> This does not seem right to me ?
> 
> I looked at the change why do I have to call a deprecated function ?
> I'm not clear what a replacement would be at the moment.

The gdk_font_* stuff is completely deprecated in favor of Pango, but since you are implementing a gdk backend you have to provide an implementation, which not surprisingly uses deprecated functions.
Comment 5 Michael Emmel 2007-06-14 06:39:13 UTC
Got it.