Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.
Bug 118554 - mc segfaults when returning from console view
Summary: mc segfaults when returning from console view
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: gpm
Version: rawhide
Hardware: i686
OS: Linux
medium
high
Target Milestone: ---
Assignee: Eido Inoue
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks: FC2Target
TreeView+ depends on / blocked
 
Reported: 2004-03-17 17:54 UTC by floba
Modified: 2007-11-30 22:10 UTC (History)
1 user (show)

Fixed In Version: 1.20.1-48
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2004-05-04 21:19:55 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description floba 2004-03-17 17:54:46 UTC
Description of problem:
Midnight Commander segfaults when returning from the fullscreen
console view. This only happens when running mc on the console; it
works just fine in xterm.


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

How reproducible:
Reproducible.


Steps to Reproduce:
1. Run mc from console
2. Press Ctrl+O for console view
3. Press Ctrl+0 to return to mc view
4. Boom.
  
Actual results:
***debug: [lib/liblow.c(205)] VC0: Segmentation fault

Expected results:
Return to mc file pane view.


Additional info:
Does not seem to be related to locale, as LC_ALL="C" mc yields the
same results.

Comment 1 Leonard den Ottolander 2004-05-02 16:07:46 UTC
This is a gpm issue, probably the same issue as bug 121845.

Comment 2 Klochan Tibor 2004-05-04 13:48:41 UTC
The segmentation in the Gpm_Open routine, line 251, strlen( consolename).
The problem is that this pointer is initialized to NULL every time you
call this routine in the line 203 but get valid value only in the
first call ( checked_con 0 in that time).

To fix it, please modify the gpm-evdev-cumulative.patch file:

line 4025, original:  +static char *consolename;
           new     :  +static char *consolename = NULL;

line 4042, original:  +    consolename = NULL;
           new     :  +//  consolename = NULL;



Comment 3 Leonard den Ottolander 2004-05-04 14:27:42 UTC
This very much reminds me of bug 101104. The patch attached to that
bug report already got rid of this assignment. Why did this got
reintroduced??


Comment 4 Eido Inoue 2004-05-04 18:40:13 UTC
Because the evdev patch was supposed to have been cumulative and I
could've sworn when I integrated it patch claimed it was already
present. Apparently not. :(

Comment 5 Leonard den Ottolander 2004-05-04 19:10:26 UTC
It might have been you integrated an incomplete version. Use the one
from bug 101104, comm. #15. The earlier attached versions are
flawed/incomplete.


Comment 6 Eido Inoue 2004-05-04 21:39:54 UTC
comment 5: fyi, patch in bug 101104 no longer works as is; consolename
is no longer a field with the options struct var-- only the static
char* version exists.

modified patch so that it checks the global consolename rather than
the field struct


Note You need to log in before you can comment on or make changes to this bug.