Bug 515055

Summary: 'altscreen' causes abort in window resize
Product: [Fedora] Fedora Reporter: Enrico Scholz <rh-bugzilla>
Component: screenAssignee: Miroslav Lichvar <mlichvar>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: low    
Version: 11CC: mlichvar
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2009-09-25 12:43:54 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
fix (apply with -p2) none

Description Enrico Scholz 2009-08-01 11:52:31 UTC
Description of problem:

When activating 'altscreen' feature, 'screen' aborts with

| Suddenly the Dungeon collapses!! - You die...

message with enlarging window.


Version-Release number of selected component (if applicable):

screen-4.0.3-13.fc11.x86_64


How reproducible:

100%


Steps to Reproduce:
0. add 'altscreen on' to ~/.screenrc
1. open non-maximized xterm
2. start 'screen -S test'
3. start 'mc' there
4. maximize 'xterm'
5. press ^L to refresh display
  

Actual results:

| Suddenly the Dungeon collapses!! - You die...

messages after some minutes


Additional info:


valgrind reports

==2344== Invalid free() / delete / delete[]
==2344==    at 0x4A0776F: realloc (vg_replace_malloc.c:429)
==2344==    by 0x415474: xrealloc (resize.c:638)
==2344==    by 0x41555A: CheckMaxSize (resize.c:554)
==2344==    by 0x4172AA: ChangeScreenSize (resize.c:211)
==2344==    by 0x4256D8: InitTermcap (termcap.c:411)
==2344==    by 0x417705: FinishAttach (socket.c:1152)
==2344==    by 0x419561: ReceiveMsg (socket.c:998)
==2344==    by 0x44407A: sched (sched.c:232)
==2344==    by 0x405E86: main (screen.c:1374)
==2344==  Address 0x50f0f80 is 0 bytes inside a block of size 256 free'd
==2344==    at 0x4A0776F: realloc (vg_replace_malloc.c:429)
==2344==    by 0x415474: xrealloc (resize.c:638)
==2344==    by 0x41556F: CheckMaxSize (resize.c:556)
==2344==    by 0x4172AA: ChangeScreenSize (resize.c:211)
==2344==    by 0x4256D8: InitTermcap (termcap.c:411)
==2344==    by 0x405C83: main (screen.c:1283)
==2344== 
==2344== Invalid free() / delete / delete[]
==2344==    at 0x4A0633D: free (vg_replace_malloc.c:323)
==2344==    by 0x4154A1: xrealloc (resize.c:640)
==2344==    by 0x41555A: CheckMaxSize (resize.c:554)
==2344==    by 0x4172AA: ChangeScreenSize (resize.c:211)
==2344==    by 0x4256D8: InitTermcap (termcap.c:411)
==2344==    by 0x417705: FinishAttach (socket.c:1152)
==2344==    by 0x419561: ReceiveMsg (socket.c:998)
==2344==    by 0x44407A: sched (sched.c:232)
==2344==    by 0x405E86: main (screen.c:1374)
==2344==  Address 0x50f0f80 is 0 bytes inside a block of size 256 free'd
==2344==    at 0x4A0776F: realloc (vg_replace_malloc.c:429)
==2344==    by 0x415474: xrealloc (resize.c:638)
==2344==    by 0x41556F: CheckMaxSize (resize.c:556)
==2344==    by 0x4172AA: ChangeScreenSize (resize.c:211)
==2344==    by 0x4256D8: InitTermcap (termcap.c:411)
==2344==    by 0x405C83: main (screen.c:1283)

Comment 1 Enrico Scholz 2009-08-01 11:59:46 UTC
might be https://savannah.gnu.org/bugs/index.php?26742

Comment 2 Enrico Scholz 2009-08-01 12:52:06 UTC
Created attachment 355878 [details]
fix (apply with -p2)

Comment 3 Miroslav Lichvar 2009-09-25 12:43:54 UTC
Included in screen-4.0.3-15.fc12. Thanks.