Bug 802559 - Xfuncproto.h breaks development of legacy (C89) applications in EL6
Xfuncproto.h breaks development of legacy (C89) applications in EL6
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: xorg-x11-proto-devel (Show other bugs)
6.2
All Linux
low Severity medium
: rc
: 6.3
Assigned To: Adam Jackson
Desktop QE
: Patch
Depends On:
Blocks: 782183 842499
  Show dependency treegraph
 
Reported: 2012-03-12 16:49 EDT by Calvin Webster
Modified: 2013-02-21 02:56 EST (History)
3 users (show)

See Also:
Fixed In Version: xorg-x11-proto-devel-7.6-25.el6
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-02-21 02:56:46 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
patch used in test RPM (890 bytes, patch)
2012-03-20 17:13 EDT, Brad Hubbard
no flags Details | Diff

  None (edit)
Description Calvin Webster 2012-03-12 16:49:55 EDT
Support request: Case 00612891

Problem description:

This issue affects versions of xorg-x11-proto-devel shipped with EL6.

While testing EL4 to EL6 migration of a development host we discovered that the variable argument macro definition for _X_NONNULL in /usr/include/X11/Xfuncproto.h caused our legacy X-Windows development tool "UIMX" to fail with the following error.

----------[begin error]----------
UIM/X: "/usr/include/X11/Xfuncproto.h", line 136: error: 2039 expected an identifier
UIM/X:   #define _X_NONNULL(...)  /* */
UIM/X:                      ^
UIM/X: 
There are 1 bad or missing header file(s). UIM/X exiting.
-----------[end error]-----------

As indicated in the xorg-devel mailing list, this will cause any C89 apps to break as variable argument macro definitions are not supported.


Confirmed bug on xorg-devel ML: http://lists.x.org/archives/xorg-devel/2011-August/024756.html
Reported by: Alan Coopersmith alan.coopersmith at oracle.com

Based on text in xorg-devel ML thread, bug-fix patch appears to have been committed upstream but no corresponding bug report could be found on https://bugs.freedesktop.org/

Patch:

-----------------------[cut here]-----------------------
--- Xfuncproto.h.orig	2011-12-07 16:09:14.000000000 -0500
+++ Xfuncproto.h	2012-03-07 10:11:54.741663224 -0500
@@ -129,10 +129,12 @@
 # define _X_ATTRIBUTE_PRINTF(x,y)
 #endif
 
-/* requires xproto >= 7.0.22 */
+/* requires xproto >= 7.0.22 - since this uses either gcc or C99 variable
+   argument macros, must be only used inside #ifdef _X_NONNULL guards, as
+   many legacy X clients are compiled in C89 mode still. */
 #if defined(__GNUC__) &&  ((__GNUC__ * 100 + __GNUC_MINOR__) >= 303)
 #define _X_NONNULL(args...)  __attribute__((nonnull(args)))
-#else
+#elif defined(__STDC_VERSION__) && (__STDC_VERSION__ - 0 >= 199901L) /* C99 */
 #define _X_NONNULL(...)  /* */
 #endif
-----------------------[cut here]-----------------------

We have patched Xfuncproto.h on the affected EL6 test machine and confirmed that this fixes the problem.

Cal Webster
Comment 3 Calvin Webster 2012-03-16 11:08:45 EDT
Red Hat has committed resources to develop a (private) patched RPM for EL6. This may find its way into the main distro.

Versions of xorg-x11-proto-devel shipped with EL4 and EL5 do not contain this flaw.

According to most recent xorg-x11-proto-devel SRPMs; FC15, FC16, and FC17 are also affected by this bug.

Xorg announced the release of xproto 7.0.23 on 15 March (yesterday) that contains a patch to resolve this issue.

http://lists.freedesktop.org/archives/xorg-announce/2012-March/001884.html

FYI: Xorg also released over 40 other updates this month. I'm guessing that Fedora Xorg package maintainers are likely to include many of these in their updates in the weeks to come.
Comment 4 Adam Jackson 2012-03-16 15:09:17 EDT
(In reply to comment #3)
> Red Hat has committed resources to develop a (private) patched RPM for EL6.
> This may find its way into the main distro.

I'm curious what you're basing this statement on.
Comment 8 Calvin Webster 2012-03-20 14:58:42 EDT
The Red Hat support developer assigned to the support case cited told me that he was developing a patched RPM.
Comment 10 Brad Hubbard 2012-03-20 17:13:38 EDT
Created attachment 571531 [details]
patch used in test RPM

Patch used during testing
Comment 11 RHEL Product and Program Management 2012-07-10 02:06:46 EDT
This request was not resolved in time for the current release.
Red Hat invites you to ask your support representative to
propose this request, if still desired, for consideration in
the next release of Red Hat Enterprise Linux.
Comment 12 RHEL Product and Program Management 2012-07-10 22:09:30 EDT
This request was erroneously removed from consideration in Red Hat Enterprise Linux 6.4, which is currently under development.  This request will be evaluated for inclusion in Red Hat Enterprise Linux 6.4.
Comment 13 RHEL Product and Program Management 2012-07-16 18:49:44 EDT
This request was evaluated by Red Hat Product Management for
inclusion in a Red Hat Enterprise Linux release.  Product
Management has requested further review of this request by
Red Hat Engineering, for potential inclusion in a Red Hat
Enterprise Linux release for currently deployed products.
This request is not yet committed for inclusion in a release.
Comment 18 errata-xmlrpc 2013-02-21 02:56:46 EST
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHBA-2013-0294.html

Note You need to log in before you can comment on or make changes to this bug.