This is the mail archive of the
cygwin
mailing list for the Cygwin project.
Re: Cygwin 64 problem
- From: Ken Brown <kbrown at cornell dot edu>
- To: cygwin at cygwin dot com, Girish Joglekar <girish53 at gmail dot com>
- Date: Sun, 4 Dec 2016 10:59:03 -0500
- Subject: Re: Cygwin 64 problem
- Authentication-results: sourceware.org; auth=none
- References: <CAGX=k3HczQGx=51xRwyKrwpKTMqaOVqxj+ud4UH=i1yCPAFGWQ@mail.gmail.com> <cf5d53e0-2464-b191-af1b-192cfc0553d9@cornell.edu> <37067fb7-8250-5aff-ebb5-8abe6746c8f6@cornell.edu>
On 11/29/2016 3:14 PM, Ken Brown wrote:
> I've looked at this a little, and the crash occurs because of a bad value of a pointer to a font list. I'm attaching an annotated transcript of a gdb session that illustrates this. I didn't try to figure out where the bad pointer came from.
I've done that now. There are three places in mosprshx.c where you cast a pointer to a pointer to an object of a different size. Interesting things happen when you dereference that pointer. The following patch gets rid of the crash:
--- mosprshx.c~ 2016-12-04 10:02:36.706325200 -0500
+++ mosprshx.c 2016-12-04 10:28:35.160038200 -0500
@@ -235,7 +235,7 @@
}
XtSetArg(al[ac],XmNcolumns,longestFixedColumnSize+1); ac++;
if(toValue.addr) {
- XtSetArg(al[ac],XmNfontList,*(unsigned int *)toValue.addr); ac++;
+ XtSetArg(al[ac],XmNfontList,*(XtArgVal *)toValue.addr); ac++;
}
for(i1=0 ; i1<nRows ; i1++) {
sprintf(widgetName,"fixedColumnRow%d",i1);
@@ -265,7 +265,7 @@
XtSetArg(al[ac],XmNcolumns,cellSize); ac++;
}
if(toValue.addr) {
- XtSetArg(al[ac],XmNfontList,*(unsigned int *)toValue.addr); ac++;
+ XtSetArg(al[ac],XmNfontList,*(XtArgVal *)toValue.addr); ac++;
}
for(j1=0 ; j1<nColumns ; j1++) {
sprintf(widgetName,"fixedRowColumn%d",j1);
@@ -295,7 +295,7 @@
XtSetArg(al[ac],XmNmaxLength,cellSize); ac++;
}
if(toValue.addr) {
- XtSetArg(al[ac],XmNfontList,*(unsigned int *)toValue.addr); ac++;
+ XtSetArg(al[ac],XmNfontList,*(XtArgVal *)toValue.addr); ac++;
}
sprintf(widgetName,"column%drow%d",j1,i1);
variableRowAndColumnTF[loc] = XmCreateTextField(variableColumnFM[j1],widgetName,al,ac); loc++;
Ken
--
Problem reports: http://cygwin.com/problems.html
FAQ: http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple