delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2016/12/04/10:59:23

X-Recipient: archive-cygwin AT delorie DOT com
DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:subject:to:references:from:message-id:date
:mime-version:in-reply-to:content-type
:content-transfer-encoding; q=dns; s=default; b=RKRNzlNDt6DO2huq
aWtNVC+z3wh2qbePm9BmQP9m4ZP1T+0U/YwUh3PXhHDSQhjCMzNpk6NxjCzCexue
gHYBxpXRZMnknWwzeY7JQUBEfj6Wfmy3MM1BIdZtr4hjieyRZpwjIwo1wLl9zKoh
G4S03N5amoQUVnaEIu1MZyEWAe8=
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:subject:to:references:from:message-id:date
:mime-version:in-reply-to:content-type
:content-transfer-encoding; s=default; bh=WAnB+SY9cGPVArXtx0tesX
Yy05k=; b=jJd8OQQBLdhX15G+Jgf+b9v9rPccdtCJ4sRGTRH1CS2Pwco5zONfjU
UmlTnkRVhU7+EQZJxMyL0a7TyCOH5JZ3totapCB6y39ey2ApNsCenmwJKok1VJTj
hSe2wxo/WMDKdqSXAiHUEZTy8dRXLxsrgI7LyoMVcGEgx86cwTFGA=
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Authentication-Results: sourceware.org; auth=none
X-Virus-Found: No
X-Spam-SWARE-Status: No, score=-4.6 required=5.0 tests=AWL,BAYES_00,RP_MATCHES_RCVD,SPF_HELO_PASS,SPF_PASS autolearn=ham version=3.3.2 spammy=H*Ad:D*cornell.edu, illustrates, H*Ad:U*kbrown, dereference
X-HELO: limerock04.mail.cornell.edu
X-CornellRouted: This message has been Routed already.
Subject: Re: Cygwin 64 problem
To: cygwin AT cygwin DOT com, Girish Joglekar <girish53 AT gmail DOT com>
References: <CAGX=k3HczQGx=51xRwyKrwpKTMqaOVqxj+ud4UH=i1yCPAFGWQ AT mail DOT gmail DOT com> <cf5d53e0-2464-b191-af1b-192cfc0553d9 AT cornell DOT edu> <37067fb7-8250-5aff-ebb5-8abe6746c8f6 AT cornell DOT edu>
From: Ken Brown <kbrown AT cornell DOT edu>
Message-ID: <dcc15a97-ca2d-90ee-a7a4-6106db368f76@cornell.edu>
Date: Sun, 4 Dec 2016 10:59:03 -0500
User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.5.1
MIME-Version: 1.0
In-Reply-To: <37067fb7-8250-5aff-ebb5-8abe6746c8f6@cornell.edu>
X-PMX-Cornell-Gauge: Gauge=XXXXX
X-PMX-CORNELL-AUTH-RESULTS: dkim-out=none;
X-IsSubscribed: yes

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

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019