Bug 152731 - x11/wmctrl segfaults with -d option on openbox
Summary: x11/wmctrl segfaults with -d option on openbox
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Florent Thoumie
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-12-01 03:10 UTC by Slawomir Wojciech Wojtczak
Modified: 2010-12-20 11:20 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Slawomir Wojciech Wojtczak 2010-12-01 03:10:11 UTC
I have just build latest version from Ports, same from package:

% wmctrl -d

GLib-ERROR **: gmem.c:157: failed to allocate 18049582881570848 bytes
aborting...
zsh: abort      wmctrl -d

How-To-Repeat: % wmctrl -d
Comment 1 Edwin Groothuis freebsd_committer freebsd_triage 2010-12-01 03:10:20 UTC
Responsible Changed
From-To: freebsd-ports-bugs->flz

Over to maintainer (via the GNATS Auto Assign Tool)
Comment 2 Slawomir Wojciech Wojtczak 2010-12-01 03:29:35 UTC
This patch solves the problem (found on the net):

--- main.c.orig 2005-01-29 04:31:33.000000000 +0100
+++ main.c  2009-01-31 16:52:09.000000000 +0100
@@ -1441,6 +1441,8 @@

     /* null terminate the result to make string handling easier */
     tmp_size = (ret_format / 8) * ret_nitems;
+    /* Correct 64 Architecture implementation of 32 bit data */
+    if(ret_format==32) tmp_size *= sizeof(long)/4;
     ret = g_malloc(tmp_size + 1);
     memcpy(ret, ret_prop, tmp_size);
     ret[tmp_size] = '\0';

Regards,
vermaden


----------------------------------------------------------------------
Gra dla duzych chlopcow.
http://linkint.pl/f2717
Comment 3 dfilter service freebsd_committer freebsd_triage 2010-12-20 11:13:50 UTC
flz         2010-12-20 11:13:44 UTC

  FreeBSD ports repository

  Modified files:
    x11/wmctrl           Makefile 
  Added files:
    x11/wmctrl/files     patch-main.c 
  Log:
  Fix -d on openbox.
  
  PR:             ports/152731
  Submitted by:   vermaden <vermaden@interia.pl>
  
  Revision  Changes    Path
  1.10      +1 -1      ports/x11/wmctrl/Makefile
  1.1       +12 -0     ports/x11/wmctrl/files/patch-main.c (new)
_______________________________________________
cvs-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/cvs-all
To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
Comment 4 Florent Thoumie freebsd_committer freebsd_triage 2010-12-20 11:14:03 UTC
State Changed
From-To: open->closed

Committed. Thanks!