Menu

#367 rdesktop crash when using -P in combination with -u

v1.8.1
closed-fixed
None
5
2013-08-18
2013-08-13
No

Reproduce using:
rdesktop -P -u test 127.0.0.1

Program received signal SIGSEGV, Segmentation fault.
0x0000003a19437c12 in XPutImage () from /usr/lib64/libX11.so.6

Discussion

  • Henrik Andersson

    Full backtrace with debug:

    Program received signal SIGSEGV, Segmentation fault.
    0x00007ffff6b94b83 in XPutImage () from /usr/lib/x86_64-    linux-gnu/libX11.so.6
    (gdb) bt
    #0  0x00007ffff6b94b83 in XPutImage ()
       from /usr/lib/x86_64-linux-gnu/libX11.so.6
    #1  0x000000000040eed1 in ui_create_bitmap (width=64,   height=64, 
        data=0xa45930    "\357\032\357\032\357\032\357\032\357\032\357\032\357\032\357\032\357\032\357\032\357\032\357\032\357\032\357\032\357\032\357\032\357\032\357\032\357\032\357\032\357\032\357\032\357\032\357\032\357\032\357\032\357\032\357\032\357\032\357\032\357\032\357\032\357\032\357\032\357\032\357\032\357\032\357\032\357\032\357\032\357\032\357\032\357\032\357\032\357\032\357\032\357\032\357\032\357\032\357\032\357\032\357\032\357\032\357\032\357\032\357\032\357\032\357\032\357\032\357\032\357\032\357\032\357\032\357\032\357\032\357\032\357\032\357\032\357\032\357\032\357\032\357\032\357\032\357\032\357\032\357\032\357\032\357\032\357\032\357\032\357\032\357\032\357\032\357\032\357\032\357\032\357\032\357\032\357\032\357\032\357\032\357\032\357\032\357\032\35 7\032\357\032\357\032\357\032\357\032\357\032"...) at  xwin.c:2753
    #2  0x0000000000431b11 in pstcache_load_bitmap (cache_id=2   '\002', cache_idx=0)
        at pstcache.c:72
    #3  0x0000000000431e19 in pstcache_enumerate (id=2 '\002', 
        keylist=<optimized out>) at pstcache.c:136
    #4  0x0000000000421b20 in rdp_enum_bmpcache2 () at  rdp.c:585
    #5  0x00000000004230d5 in process_demand_active (s=0x6cc8a0) at rdp.c:1067
    #6  rdp_loop (deactivated=0x7fffffffdb48,     ext_disc_reason=0x7fffffffdb4c)
    ---Type <return> to continue, or q <return> to quit---
        at rdp.c:1611
    #7  0x00000000004238e9 in rdp_connect (server=<optimized    out>, flags=0, 
        domain=<optimized out>, password=0x7fffffffe010 "", 
        command=0x7fffffffdd90 "", directory=0x7fffffffde90 "",   reconnect=0)
        at rdp.c:1653
    #8  0x0000000000407ae2 in main (argc=<optimized out>, argv=  <optimized out>)
        at rdesktop.c:1105
    
     

    Last edit: Henrik Andersson 2013-08-14
  • Henrik Andersson

    Verified that this is also a problem with rdesktop v1.7.0 so it is not a regression.

     
  • Henrik Andersson

    The sole issue seems to be located in pstcache_enumerate() which will preload all cached bitmaps to memory but we don't have a window at this time and can therefore not create the bitmap.

    However it is strange why specifying a username as argument changes the codepath, needs more investigation. Verify that the PDU flow is the same for both cases. And if its is received at same time, for the case where username is specified the PDU is received ad rdp_connect() and that's before ui_create_window().

     
  • Henrik Andersson

    Disabling the prechace of bitmap cache seems like a decent fix for this issue.

    See commit r1731

     
  • Henrik Andersson

    • status: open --> closed-fixed
     
  • Henrik Andersson

    • Group: Future --> v1.8.1