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

 
 

bug #31768: xbindkeys crashes with libx11-1.4

Submitted by:  None
Submitted on:  Fri 03 Dec 2010 08:45:53 AM UTC  
Votes:  100  
 
Category: NoneSeverity: 3 - Normal
Item Group: NoneStatus: None
Privacy: PublicAssigned to: None
Open/Closed: Closed

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

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>
Project Administrator
Sat 04 Dec 2010 10:21:48 PM UTC, comment #1:

Looks like someone may have tracked down the problem:

https://bugs.archlinux.org/task/21924#comment69358

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

Anonymous
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

Other:
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.

Anonymous

 

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

Attach File(s):
   
   
Comment:
   

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
  • -unavailable- added by hocwp (Posted a comment)
  • -unavailable- added by stmartin81 (Voted in favor of this item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 100 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 4 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Wed 08 Dec 2010 08:41:48 PM UTChocwpOpen/ClosedOpen=>Closed
    Sat 04 Dec 2010 02:47:23 PM UTCstmartin81Carbon-Copy-=>Added stmartin81
    Fri 03 Dec 2010 08:45:53 AM UTCNoneAttached File-=>Added xbindbug.txt, #22111
      Attached File-=>Added xbindval.txt, #22112

    Back to the top


    Powered by Savane 3.1-cleanup1