NetBSD Problem Report #52739

From www@NetBSD.org  Mon Nov 20 02:27:32 2017
Return-Path: <www@NetBSD.org>
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(Client CN "mail.NetBSD.org", Issuer "mail.NetBSD.org CA" (not verified))
	by mollari.NetBSD.org (Postfix) with ESMTPS id C34FF7A1CB
	for <gnats-bugs@gnats.NetBSD.org>; Mon, 20 Nov 2017 02:27:31 +0000 (UTC)
Message-Id: <20171120022731.047A67A1EA@mollari.NetBSD.org>
Date: Mon, 20 Nov 2017 02:27:30 +0000 (UTC)
From: lechapelaing@yahoo.fr
Reply-To: lechapelaing@yahoo.fr
To: gnats-bugs@NetBSD.org
Subject: sysutils/xfm crashes on start
X-Send-Pr-Version: www-1.0

>Number:         52739
>Category:       pkg
>Synopsis:       sysutils/xfm crashes on start
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Nov 20 02:30:00 +0000 2017
>Last-Modified:  Sun Jan 13 09:00:01 +0000 2019
>Originator:     Germain Le Chapelain
>Release:        current
>Organization:
CGN
>Environment:
NetBSD germ 8.99.1 NetBSD 8.99.1 (GENERIC) #0: Wed Jul  5 22:24:56 UTC 2017  german@germ:/usr/obj/sys/arch/amd64/compile/GENERIC amd64
b
>Description:
sysutils/xfm crashes on start-up
>How-To-Repeat:
install xfm 
launch it
observe segmentation violation
>Fix:
I have been battling to build it with debug symbols but couldn't 

I tried adding CFLAGS+=-g CXXFLAGS+=-g but then the package doesn't build

The package uses IMAKE which makes it tricky for me to debug further

I can swear I had a workaround in the past and got xfm working

>Audit-Trail:
From: David Holland <dholland-pbugs@netbsd.org>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: pkg/52739: sysutils/xfm crashes on start
Date: Mon, 26 Nov 2018 00:02:41 +0000

 On Mon, Nov 20, 2017 at 02:30:00AM +0000, lechapelaing@yahoo.fr wrote:
  > >How-To-Repeat:
  > install xfm 
  > launch it
  > observe segmentation violation

 Here's the (first few) problems:

 At the end of XtVaCreateManagedWidget in FmLog.c, it needs this change:

 -         0);
 +         (void *)NULL);


 Otherwise it passes a 32-bit integer zero instead of a 64-bit null
 pointer and the receiving code doesn't recognize it as terminating the
 argument sequence, continues on, and croaks.

 Unfortunately, it then needs a bazillion more of these, since there
 are a lot of XtVa... calls and many of them end with 0 instead of
 NULL.

 (also for technical C reasons such calls should end in (void *)NULL
 and not just NULL, but this is less important in practice.)

 Is there an upstream? Since the full patch is likely to be large it
 might be a good idea to coordinate with them if they exist.

  > I can swear I had a workaround in the past and got xfm working

 gcc -m32 would be a workaround if you have 32-bit X libs... but
 setting that up in pkgsrc would be a pain.

 -- 
 David A. Holland
 dholland@netbsd.org

From: "David A. Holland" <dholland@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/52739 CVS commit: pkgsrc/sysutils/xfm
Date: Mon, 26 Nov 2018 06:52:22 +0000

 Module Name:	pkgsrc
 Committed By:	dholland
 Date:		Mon Nov 26 06:52:22 UTC 2018

 Modified Files:
 	pkgsrc/sysutils/xfm: Makefile distinfo
 Removed Files:
 	pkgsrc/sysutils/xfm/patches: patch-ac

 Log Message:
 Add a distfile patch to handle pervasive LP64 problems.
 Also include assorted cleanup: don't use sprintf, don't use getwd,
 fix some 32-bit file size truncations I noticed, use standard
 functions and headers, etc.

 patch-ac has been rolled into the distfile patch, but (for now anyway)
 not the others.

 Use tradcpp to produce the app-defaults file (and an install script)
 as otherwise these were getting mangled.

 PR 52739.

 This makes it no longer segfault calling XtVaSetValues() on all LP64
 platforms. But, unfortunately, for me it's still crashing, and I'm out
 of available time to chase the problem further.

 The symptom is that it crashes with a bad font pointer in the
 Initialize code of its TextField widget, which seems to be because
 something overwrites some X resource strings with garbage so the font
 doesn't get set. I think. This seems to be happening from inside libXt.

 Disabling libXaw3d (which there isn't a straightforward pkgsrc hook
 for) makes it run, or at least start, so I think it's a net
 improvement.


 To generate a diff of this commit:
 cvs rdiff -u -r1.19 -r1.20 pkgsrc/sysutils/xfm/Makefile
 cvs rdiff -u -r1.8 -r1.9 pkgsrc/sysutils/xfm/distinfo
 cvs rdiff -u -r1.1.1.1 -r0 pkgsrc/sysutils/xfm/patches/patch-ac

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

From: le chapelain germain <lechapelaing@yahoo.fr>
To: <gnats-bugs@NetBSD.org>
Cc: 
Subject: Re: PR/52739 CVS commit: pkgsrc/sysutils/xfm
Date: Wed, 19 Dec 2018 01:25:57 +0000 (UTC)

 ------=_Part_3192249_523731667.1545182757283
 Content-Type: text/plain; charset=UTF-8
 Content-Transfer-Encoding: quoted-printable

  Thank you so much for looking into it!

 Germain

     Le dimanche 25 novembre 2018 =C3=A0 22:55:04 UTC=E2=88=928, David A. Ho=
 lland <dholland@netbsd.org> a =C3=A9crit : =20
 =20
  The following reply was made to PR pkg/52739; it has been noted by GNATS.

 From: "David A. Holland" <dholland@netbsd.org>
 To: gnats-bugs@gnats.NetBSD.org
 Cc:=20
 Subject: PR/52739 CVS commit: pkgsrc/sysutils/xfm
 Date: Mon, 26 Nov 2018 06:52:22 +0000

  Module Name:=C2=A0=C2=A0=C2=A0 pkgsrc
  Committed By:=C2=A0=C2=A0=C2=A0 dholland
  Date:=C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 Mon Nov 26 06:52:22 UTC 2018
 =20
  Modified Files:
  =C2=A0=C2=A0=C2=A0 pkgsrc/sysutils/xfm: Makefile distinfo
  Removed Files:
  =C2=A0=C2=A0=C2=A0 pkgsrc/sysutils/xfm/patches: patch-ac
 =20
  Log Message:
  Add a distfile patch to handle pervasive LP64 problems.
  Also include assorted cleanup: don't use sprintf, don't use getwd,
  fix some 32-bit file size truncations I noticed, use standard
  functions and headers, etc.
 =20
  patch-ac has been rolled into the distfile patch, but (for now anyway)
  not the others.
 =20
  Use tradcpp to produce the app-defaults file (and an install script)
  as otherwise these were getting mangled.
 =20
  PR 52739.
 =20
  This makes it no longer segfault calling XtVaSetValues() on all LP64
  platforms. But, unfortunately, for me it's still crashing, and I'm out
  of available time to chase the problem further.
 =20
  The symptom is that it crashes with a bad font pointer in the
  Initialize code of its TextField widget, which seems to be because
  something overwrites some X resource strings with garbage so the font
  doesn't get set. I think. This seems to be happening from inside libXt.
 =20
  Disabling libXaw3d (which there isn't a straightforward pkgsrc hook
  for) makes it run, or at least start, so I think it's a net
  improvement.
 =20
 =20
  To generate a diff of this commit:
  cvs rdiff -u -r1.19 -r1.20 pkgsrc/sysutils/xfm/Makefile
  cvs rdiff -u -r1.8 -r1.9 pkgsrc/sysutils/xfm/distinfo
  cvs rdiff -u -r1.1.1.1 -r0 pkgsrc/sysutils/xfm/patches/patch-ac
 =20
  Please note that diffs are not public domain; they are subject to the
  copyright notices on the relevant files.
 =20
  =20
 ------=_Part_3192249_523731667.1545182757283
 Content-Type: text/html; charset=UTF-8
 Content-Transfer-Encoding: quoted-printable

 <html><head></head><body><div class=3D"ydp69ed12abyahoo-style-wrap" style=
 =3D"font-family:Helvetica Neue, Helvetica, Arial, sans-serif;font-size:16px=
 ;"><div></div>
         <div>Thank you so much for looking into it!</div><div><br></div><di=
 v><br></div><div>Germain<br></div><div><br></div>
        =20
         </div><div id=3D"ydpbc06c5f0yahoo_quoted_6139974779" class=3D"ydpbc=
 06c5f0yahoo_quoted">
             <div style=3D"font-family:'Helvetica Neue', Helvetica, Arial, s=
 ans-serif;font-size:13px;color:#26282a;">
                =20
                 <div>
                     Le dimanche 25 novembre 2018 =C3=A0 22:55:04 UTC=E2=88=
 =928, David A. Holland &lt;dholland@netbsd.org&gt; a =C3=A9crit :
                 </div>
                 <div><br></div>
                 <div><br></div>
                 <div><div dir=3D"ltr">The following reply was made to PR pk=
 g/52739; it has been noted by GNATS.<br></div><div dir=3D"ltr"><br></div><d=
 iv dir=3D"ltr">From: "David A. Holland" &lt;<a href=3D"mailto:dholland@netb=
 sd.org" rel=3D"nofollow" target=3D"_blank">dholland@netbsd.org</a>&gt;<br><=
 /div><div dir=3D"ltr">To: <a href=3D"mailto:gnats-bugs@gnats.NetBSD.org" re=
 l=3D"nofollow" target=3D"_blank">gnats-bugs@gnats.NetBSD.org</a><br></div><=
 div dir=3D"ltr">Cc: <br></div><div dir=3D"ltr">Subject: PR/52739 CVS commit=
 : pkgsrc/sysutils/xfm<br></div><div dir=3D"ltr">Date: Mon, 26 Nov 2018 06:5=
 2:22 +0000<br></div><div dir=3D"ltr"><br></div><div dir=3D"ltr"> Module Nam=
 e:&nbsp;&nbsp;&nbsp; pkgsrc<br></div><div dir=3D"ltr"> Committed By:&nbsp;&=
 nbsp;&nbsp; dholland<br></div><div dir=3D"ltr"> Date:&nbsp;&nbsp;&nbsp; &nb=
 sp;&nbsp;&nbsp; Mon Nov 26 06:52:22 UTC 2018<br></div><div dir=3D"ltr"> <br=
 ></div><div dir=3D"ltr"> Modified Files:<br></div><div dir=3D"ltr"> &nbsp;&=
 nbsp;&nbsp; pkgsrc/sysutils/xfm: Makefile distinfo<br></div><div dir=3D"ltr=
 "> Removed Files:<br></div><div dir=3D"ltr"> &nbsp;&nbsp;&nbsp; pkgsrc/sysu=
 tils/xfm/patches: patch-ac<br></div><div dir=3D"ltr"> <br></div><div dir=3D=
 "ltr"> Log Message:<br></div><div dir=3D"ltr"> Add a distfile patch to hand=
 le pervasive LP64 problems.<br></div><div dir=3D"ltr"> Also include assorte=
 d cleanup: don't use sprintf, don't use getwd,<br></div><div dir=3D"ltr"> f=
 ix some 32-bit file size truncations I noticed, use standard<br></div><div =
 dir=3D"ltr"> functions and headers, etc.<br></div><div dir=3D"ltr"> <br></d=
 iv><div dir=3D"ltr"> patch-ac has been rolled into the distfile patch, but =
 (for now anyway)<br></div><div dir=3D"ltr"> not the others.<br></div><div d=
 ir=3D"ltr"> <br></div><div dir=3D"ltr"> Use tradcpp to produce the app-defa=
 ults file (and an install script)<br></div><div dir=3D"ltr"> as otherwise t=
 hese were getting mangled.<br></div><div dir=3D"ltr"> <br></div><div dir=3D=
 "ltr"> PR 52739.<br></div><div dir=3D"ltr"> <br></div><div dir=3D"ltr"> Thi=
 s makes it no longer segfault calling XtVaSetValues() on all LP64<br></div>=
 <div dir=3D"ltr"> platforms. But, unfortunately, for me it's still crashing=
 , and I'm out<br></div><div dir=3D"ltr"> of available time to chase the pro=
 blem further.<br></div><div dir=3D"ltr"> <br></div><div dir=3D"ltr"> The sy=
 mptom is that it crashes with a bad font pointer in the<br></div><div dir=
 =3D"ltr"> Initialize code of its TextField widget, which seems to be becaus=
 e<br></div><div dir=3D"ltr"> something overwrites some X resource strings w=
 ith garbage so the font<br></div><div dir=3D"ltr"> doesn't get set. I think=
 . This seems to be happening from inside libXt.<br></div><div dir=3D"ltr"> =
 <br></div><div dir=3D"ltr"> Disabling libXaw3d (which there isn't a straigh=
 tforward pkgsrc hook<br></div><div dir=3D"ltr"> for) makes it run, or at le=
 ast start, so I think it's a net<br></div><div dir=3D"ltr"> improvement.<br=
 ></div><div dir=3D"ltr"> <br></div><div dir=3D"ltr"> <br></div><div dir=3D"=
 ltr"> To generate a diff of this commit:<br></div><div dir=3D"ltr"> cvs rdi=
 ff -u -r1.19 -r1.20 pkgsrc/sysutils/xfm/Makefile<br></div><div dir=3D"ltr">=
  cvs rdiff -u -r1.8 -r1.9 pkgsrc/sysutils/xfm/distinfo<br></div><div dir=3D=
 "ltr"> cvs rdiff -u -r1.1.1.1 -r0 pkgsrc/sysutils/xfm/patches/patch-ac<br><=
 /div><div dir=3D"ltr"> <br></div><div dir=3D"ltr"> Please note that diffs a=
 re not public domain; they are subject to the<br></div><div dir=3D"ltr"> co=
 pyright notices on the relevant files.<br></div><div dir=3D"ltr"> <br></div=
 ></div>
             </div>
         </div></body></html>
 ------=_Part_3192249_523731667.1545182757283--

From: David Holland <dholland-pbugs@netbsd.org>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: PR/52739 CVS commit: pkgsrc/sysutils/xfm
Date: Sun, 13 Jan 2019 08:58:26 +0000

 On Wed, Dec 19, 2018 at 02:20:01AM +0000, le chapelain germain wrote:
  >   Thank you so much for looking into it!

 Save that for whoever actually makes it work :-|

 -- 
 David A. Holland
 dholland@netbsd.org

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.43 2018/01/16 07:36:43 maya Exp $
$NetBSD: gnats_config.sh,v 1.9 2014/08/02 14:16:04 spz Exp $
Copyright © 1994-2017 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.