bugGNU Screen - Bugs: bug #10075, sending the copy command to a...

 
 

bug #10075: sending the copy command to a detached screen causes a seg fault

Submitted by:  None
Submitted on:  Fri 20 Aug 2004 02:53:34 PM UTC  
 
Category: Crash/Freeze/InfloopSeverity: 5 - Blocker
Priority: 5 - NormalStatus: Fixed
Privacy: PublicAssigned to: None
Open/Closed: ClosedRelease: 4.0.2
Fixed Release: 4.1.0Planned Release: 4.1.0
Work Required: 0 - Hours

Add a New Comment(Rich Markup)
   

You are not logged in

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

 

Wed 09 Jul 2008 05:26:51 AM UTC, comment #2:

Fixed in 4318a55440a7e696cccff46eb47527604379a0ee

Micah Cowan <micahcowan>
Wed 09 Jul 2008 04:28:40 AM UTC, comment #1:

The "copy" command requires a valid display, as the assertion "ASSERT(fore && display && D_user);" in mark.c:MarkRoutine indicates.

The attached patch fixes this bug by setting the NEED_DISPLAY flag for the "copy" command.

(file #16037)

Sadrul Habib Chowdhury <sadrul>
Project Administrator
 Spam posted by an anonymous
Fri 20 Aug 2004 02:53:34 PM UTC, original submission:

I downloaded, built and tested this with 'Screen version 4.00.02 (FAU) 5-Dec-03' on a PC running RedHat 8 with a custom 2.4.20 kernel.

Steps to reproduce:

screen -S test
(detach with <ctrl>ad)
screen -S test -X copy
(observe the screen crashes with the following from gdb)

Program received signal SIGSEGV, Segmentation fault.
MarkRoutine () at mark.c:446
446 markdata->md_user = D_user; /* XXX: Correct? */
(gdb) bt
#0 MarkRoutine () at mark.c:446
#1 0x0806bcb0 in DoAction (act=0xbfffe100, key=-1) at process.c:2088
#2 0x08070503 in DoCommand (argv=0xbfffe250, argl=0xbfffe150) at process.c:3853
#3 0x0805c640 in DoCommandMsg (mp=0x808bbe0) at socket.c:1420
#4 0x0805bd3d in ReceiveMsg () at socket.c:1026
#5 0x0807e273 in sched () at sched.c:232
#6 0x0804b46a in main (ac=0, av=0xbffff898) at screen.c:1362
#7 0x420158d4 in __libc_start_main () from /lib/i686/libc.so.6
(gdb) l
441
442 if (InitOverlayPage(sizeof(*markdata), &MarkLf, 1))
443 return;
444 flayer->l_encoding = fore->w_encoding;
445 markdata = (struct markdata *)flayer->l_data;
446 markdata->md_user = D_user; /* XXX: Correct? */
447 markdata->md_window = fore;
448 markdata->second = 0;
449 markdata->rep_cnt = 0;
450 markdata->append_mode = 0;

Anonymous

 

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

Attach File(s):
   
   
Comment:
   

Attached Files

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by sadrul (Updated the item)
  • -unavailable- added by micahcowan (Updated the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 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 10 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Wed 09 Jul 2008 05:26:51 AM UTCmicahcowanStatusConfirmed=>Fixed
      Open/ClosedOpen=>Closed
      Fixed ReleaseNone=>4.1.0
    Wed 09 Jul 2008 04:28:40 AM UTCsadrulAttached File-=>Added screen_copy_need_display.patch, #16037
    Mon 23 Jun 2008 09:00:02 PM UTCmicahcowanCategoryNone=>Crash/Freeze/Infloop
      Severity3 - Normal=>5 - Blocker
      ReleaseNone=>4.0.2
      Planned ReleaseNone=>4.1.0
      Work RequiredNone=>0 - Hours
    Fri 13 Jun 2008 07:22:16 AM UTCmicahcowanStatusNone=>Confirmed

    Back to the top


    Powered by Savane 3.1-cleanup1