bugxbindkeys - Bugs: bug #31768, xbindkeys crashes with libx11-1.4


bug #31768: xbindkeys crashes with libx11-1.4

Submitter:  None
Submitted:  Fri 03 Dec 2010 08:45:53 AM UTC
Votes: 100
Category:  None Severity:  3 - Normal
Item Group:  None Status:  None
Privacy:  Public Assigned to:  None
Open/Closed:  Closed
* Mandatory Fields

Add a New Comment Rich Markup

Sun 05 Dec 2010 08:44:48 PM UTC, comment #2: 

I've fixed it this way. A new version of xbindkeys is comming soon.

Philippe Brochard <hocwp>
Group administrator
Sat 04 Dec 2010 10:21:48 PM UTC, comment #1: 

Looks like someone may have tracked down the problem:


I think the problem is caused by line 205 of xbindkeys.c
  size_t envstr_size = strlen(DisplayString(xany->display)) + 8 + 1;
  [b]char* envstr = malloc (envstr_size);[/b]
  XWindowAttributes attr;
  char* ptr;
  char buf[16];

Increasing the allocated memory by 2 (char* envstr = malloc (envstr_size+2);) seems to solve the issue.

(gdb) backtrace
#0  0xb7fa6c38 in _duma_strncat () from /usr/lib/libduma.so.0.0.0
#1  0xb7fa6e7a in strncat () from /usr/lib/libduma.so.0.0.0
#2  0x080497db in adjust_display (xany=0xbffff228) at xbindkeys.c:222
#3  0x08049ace in event_loop (d=0xb6ddf6bc) at xbindkeys.c:320
#4  0x08049573 in inner_main (argc=0, argv=0x0) at xbindkeys.c:134
#5  0xb7e09d26 in invoke_main_func () from /usr/lib/libguile.so.17
#6  0xb7ddad12 in c_body () from /usr/lib/libguile.so.17
#7  0xb7e51723 in scm_c_catch () from /usr/lib/libguile.so.17
#8  0xb7ddb312 in scm_i_with_continuation_barrier () from /usr/lib/libguile.so.17
#9  0xb7ddb3f3 in scm_c_with_continuation_barrier () from /usr/lib/libguile.so.17
#10 0xb7e502f9 in scm_i_with_guile_and_parent () from /usr/lib/libguile.so.17
#11 0xb7e503ee in scm_with_guile () from /usr/lib/libguile.so.17
#12 0xb7e09cbf in scm_boot_guile () from /usr/lib/libguile.so.17
#13 0x080495d3 in main (argc=2, argv=0xbffff604) at xbindkeys.c:154

Fri 03 Dec 2010 08:45:53 AM UTC, original submission:  

Description: xbindkeys crashes after pressing two bound keys. This can be avoided by downgrading from libx11-1.4 to older versions.

Additional info:

Steps to reproduce:
Install these packages and attempt to use any keys that have binds in ~/.xbindkeysrc

I'm not sure whether the actual bug is in the libx11-1.4 source or in the xbindkeys source.

I have attached a backtrace. The pages for libx11 and xbindkeys don't seem to have bug trackers that I can find.

I have also attached a valgrind log. Running xbindkeys under valgrind somehow stops the crash from occurring and I have no idea why.



(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:

Attached Files
file #22111:  xbindbug.txt added by None (5KiB - text/plain)
file #22112:  xbindval.txt added by None (52KiB - text/plain)


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -email is unavailable- added by hocwp (Posted a comment)
  • -email is unavailable- added by stmartin81 (Voted in favor of this item)

    There are 100 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.


    Follow 4 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2010-12-08 hocwp Open/ClosedOpen Closed
    2010-12-04 stmartin81 Carbon-Copy- Added stmartin81
    2010-12-03 None Attached File- Added xbindbug.txt, #22111
        Attached File- Added xbindval.txt, #22112

    Back to the top

    Powered by Savane 3.12