Bug 7235 - amd64 ncurses chtype causes display corruption
Summary: amd64 ncurses chtype causes display corruption
Status: RESOLVED FIXED
Alias: None
Product: Mageia
Classification: Unclassified
Component: RPM Packages (show other bugs)
Version: 2
Hardware: x86_64 Linux
Priority: Normal normal
Target Milestone: ---
Assignee: Mageia Bug Squad
QA Contact:
URL:
Whiteboard:
Keywords: Junior_job, PATCH
Depends on:
Blocks:
 
Reported: 2012-08-29 05:39 CEST by Peter D
Modified: 2013-08-26 16:07 CEST (History)
2 users (show)

See Also:
Source RPM: ncurses
CVE:
Status comment:


Attachments

Description Peter D 2012-08-29 05:39:08 CEST
Initially I noticed screen corruption while installing nVidia packaged drivers.  After some correspondence with nVidia it seems likely that the problem is with ncurses.  The issue exists in Mageia 1 and Mageia 2.  I have not checked Cauldron.  

They standard footers in nVidia's email says, "confidential", but the text says, "make sure that your distributor is aware of the problem".  I have decided that that is at least partial authorization to disclose and will quote extensively.  

> Hi Pete,
> 
> What distribution are you using? About 6 years ago, there was a change 
> in ncurses that broke binary compatibility with the version of ncurses 
> we build against: chtype changed from an unsigned long to an unsigned 
> int, causing problems like the ones you demonstrated on amd64 systems, 
> where those types have different sizes.
> 
> Red Hat and SUSE resolved this issue by configuring their ncurses builds 
> with --with-chtype=long on amd64:
> 
> https://bugzilla.redhat.com/show_bug.cgi?id=178824
> https://bugzilla.novell.com/show_bug.cgi?id=151283
> 
> (Note: the Red Hat bugzilla site was down when I wrote this e-mail; 
> perhaps it will be working again by the time you read it.)
> 
> I suspect that upstream ncurses resolved the issue and made chtype an 
> unsigned long again, to maintain binary compatibility with older 
> versions of ncurses, since we haven't heard much of this issue since then.
> 
> If you happen to have a version of ncurses that is affected by this, 
> check to make sure the latest version from your distributor doesn't have 
> this issue; if it does, then make sure that your distributor is aware of 
> the problem.
> 
> If you built your own ncurses, then you can either rebuild ncurses with 
> --with-chtype=long to see if that resolves the issue, or rebuild 
> nvidia-installer against your ncurses headers. (The source to 
> nvidia-installer is available at: 
> http://cgit.freedesktop.org/~aplattner/nvidia-installer/ 
> <http://cgit.freedesktop.org/%7Eaplattner/nvidia-installer/> )>
> 
> After you build nvidia-installer, you can replace the nvidia-installer 
> binary from a .run package like this:
> 
> 1) Extract the package using the "-x" commandline option. (This will 
> create a new directory with the package name, minus the ".run" extension)
> 2) Replace the nvidia-installer binary in the newly created directory 
> with the nvidia-installer binary you built
> 3) Run the new nvidia-installer from inside the extracted directory.
Comment 1 Thierry Vignaud 2012-09-01 00:19:45 CEST
Just fixed in Cauldron

CC: (none) => thierry.vignaud
Source RPM: (none) => ncurses

Thierry Vignaud 2012-09-01 00:19:55 CEST

Keywords: (none) => Junior_job, PATCH

Comment 2 Thierry Vignaud 2012-09-05 08:15:09 CEST
Note that this broke htop.
Recompiling it appears to fix it.
Comment 3 Dan Fandrich 2012-09-27 13:12:18 CEST
If the new ncurses libs are binary incompatible with the old ones, they should be given a new SONAME.

CC: (none) => dan

Comment 4 Samuel Verschelde 2013-08-26 16:07:31 CEST
According to comment #1 I gather it is fixed, so closing. Please reopen if I was mistaken.

Status: NEW => RESOLVED
Resolution: (none) => FIXED


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