ports/113678: rdesktop crashes after upgrading X.Org to 7.2
Rashid N. Achilov
achilov-rn at askd.ru
Thu Jun 14 12:10:06 UTC 2007
>Number: 113678
>Category: ports
>Synopsis: rdesktop crashes after upgrading X.Org to 7.2
>Confidential: no
>Severity: critical
>Priority: high
>Responsible: freebsd-ports-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: sw-bug
>Submitter-Id: current-users
>Arrival-Date: Thu Jun 14 12:10:05 GMT 2007
>Closed-Date:
>Last-Modified:
>Originator: Rashid N. Achilov
>Release: 6.2-RELEASE
>Organization:
LLC "AS-System Complex"
>Environment:
FreeBSD to-495.askd.ru 6.2-RELEASE FreeBSD 6.2-RELEASE #3: Fri Feb 16 18:47:32 NOVT 2007 root at to-495.askd.ru:/usr/obj/usr/src/sys/Sentry i386
>Description:
After upgrading X.Org to 7.2 rdesktop constantly crash with 'Segmentation Fault'. I have search web and have discovered, that is a common problem - that was many bureports, but none for FreeBSD? :-O No any FreeBSD user uses rdesktop with ordinary office box, when DRI disabled (when DRI runs, bug doesn't occured) ? :-O I have found a parital solution on some Debian forum, where was told, that X11 now check on sanity for some parameters at XCreateImage and returns NULL, when not satisifed. Rdesktop is very old program, it does not check any return codes. So, I have looked at source code, read a man for XCreateImage and detect a call for XCreateImage, which throws an exception. So, I have search web again and found a patch at Ubuntu forum (he-he, Linux again :-) ). When I have applied a patch, bug was eliminated. Also I have added some debug code to point to exception source.
>How-To-Repeat:
Run rdesktop and login to any server. After succesful login rdesktop will crash
>Fix:
Patch attached
Patch attached with submission follows:
--- xwin.c.old Mon Aug 7 18:45:44 2006
+++ xwin.c Thu Jun 14 18:57:28 2007
@@ -2341,6 +2341,12 @@
image = XCreateImage(g_display, g_visual, g_depth, ZPixmap, 0,
(char *) tdata, width, height, bitmap_pad, 0);
+ if (!image)
+ {
+ puts("(ui_create_bitmap) XCreateImage returns NULL!");
+ exit(100);
+ }
+
XPutImage(g_display, bitmap, g_create_bitmap_gc, image, 0, 0, 0, 0, width, height);
XFree(image);
@@ -2372,6 +2378,12 @@
image = XCreateImage(g_display, g_visual, g_depth, ZPixmap, 0,
(char *) tdata, width, height, bitmap_pad, 0);
+ if (!image)
+ {
+ puts("(ui_paint_bitmap) XCreateImage returns NULL!");
+ exit(100);
+ }
+
if (g_ownbackstore)
{
XPutImage(g_display, g_backstore, g_gc, image, 0, 0, x, y, cx, cy);
@@ -2414,6 +2426,13 @@
image = XCreateImage(g_display, g_visual, 1, ZPixmap, 0, (char *) data,
width, height, 8, scanline);
+
+ if (!image)
+ {
+ puts("(ui_create_glyph) XCreateImage returns NULL!");
+ exit(100);
+ }
+
image->byte_order = MSBFirst;
image->bitmap_bit_order = MSBFirst;
XInitImage(image);
@@ -3219,7 +3238,13 @@
return;
image = XCreateImage(g_display, g_visual, g_depth, ZPixmap, 0,
- (char *) data, cx, cy, BitmapPad(g_display), cx * g_bpp / 8);
+ (char *) data, cx, cy, g_bpp, 0);
+
+ if (!image)
+ {
+ puts("(ui_desktop_restore) XCreateImage returns NULL!");
+ exit(100);
+ }
if (g_ownbackstore)
{
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list