Package: tcm
Version: 2.20+TSQD-2
Severity: important
Tags: patch

tcm and its components don't work on amd64:

Running /usr/bin/tcm
Segmentation Fault occurred.
Please send a bug report to [EMAIL PROTECTED]
Running /usr/bin/tatd
Segmentation Fault occurred.
Please send a bug report to [EMAIL PROTECTED]
Running /usr/bin/tcbd
Segmentation Fault occurred.
Please send a bug report to [EMAIL PROTECTED]
Running /usr/bin/tcpd
Segmentation Fault occurred.
Please send a bug report to [EMAIL PROTECTED]
Running /usr/bin/tcrd
Segmentation Fault occurred.
Please send a bug report to [EMAIL PROTECTED]
Running /usr/bin/tdfd
Segmentation Fault occurred.
Please send a bug report to [EMAIL PROTECTED]
Running /usr/bin/tdpd
Segmentation Fault occurred.
Please send a bug report to [EMAIL PROTECTED]
Running /usr/bin/tefd
Segmentation Fault occurred.
Please send a bug report to [EMAIL PROTECTED]
Running /usr/bin/terd
Segmentation Fault occurred.
Please send a bug report to [EMAIL PROTECTED]
Running /usr/bin/tesd
Segmentation Fault occurred.
Please send a bug report to [EMAIL PROTECTED]
Running /usr/bin/tfet
Segmentation Fault occurred.
Please send a bug report to [EMAIL PROTECTED]
Running /usr/bin/tfrt
Segmentation Fault occurred.
Please send a bug report to [EMAIL PROTECTED]
Running /usr/bin/tgd
Segmentation Fault occurred.
Please send a bug report to [EMAIL PROTECTED]
Running /usr/bin/tgt
Segmentation Fault occurred.
Please send a bug report to [EMAIL PROTECTED]
Running /usr/bin/tgtt
Segmentation Fault occurred.
Please send a bug report to [EMAIL PROTECTED]
Running /usr/bin/tpsd
Segmentation Fault occurred.
Please send a bug report to [EMAIL PROTECTED]
Running /usr/bin/trpg
Segmentation Fault occurred.
Please send a bug report to [EMAIL PROTECTED]
Running /usr/bin/tscd
Segmentation Fault occurred.
Please send a bug report to [EMAIL PROTECTED]
Running /usr/bin/tsnd
Segmentation Fault occurred.
Please send a bug report to [EMAIL PROTECTED]
Running /usr/bin/tsqd
Segmentation Fault occurred.
Please send a bug report to [EMAIL PROTECTED]
Running /usr/bin/tssd
Segmentation Fault occurred.
Please send a bug report to [EMAIL PROTECTED]
Running /usr/bin/tstd
Segmentation Fault occurred.
Please send a bug report to [EMAIL PROTECTED]
Running /usr/bin/ttdt
Segmentation Fault occurred.
Please send a bug report to [EMAIL PROTECTED]
Running /usr/bin/ttut
Segmentation Fault occurred.
Please send a bug report to [EMAIL PROTECTED]
Running /usr/bin/tucd
Segmentation Fault occurred.
Please send a bug report to [EMAIL PROTECTED]

(this was the slightly modified result of
  for i in $(dpkg -L tcm | grep "/usr/bin/t" | grep -v text2ps) \
    ; do echo "Running $i" ; $i -h ; done
)


There are some problems with the varargs-list-handling, gdb shows
the violation:

#0  0x00002aaaaaec614f in _XtCountVaList () from /usr/X11R6/lib/libXt.so.6
#1  0x00002aaaaaec4bce in XtVaCreatePopupShell ()

The attached patch corrects the problem, tcm and its components
are now working (or at least starting up). As you can see, the
fix is always a replacement of the last '0' by 'NULL'. There
are more Xt-functions with varargs-lists not covered by this
patch, so it could be possible that more bugs will occur
while using tcm.

I think this problem should be reported to upstream.

(note: I'm reporting from my i386-workstation, the amd64 system is not
       allowed to send mail)

-- System Information:
Debian Release: testing/unstable
  APT prefers testing
  APT policy: (900, 'testing'), (50, 'unstable')
Architecture: i386 (i686)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.14
Locale: LANG=C, LC_CTYPE=de_DE (charmap=ISO-8859-1)

Versions of packages tcm depends on:
ii  lesstif2                1:0.93.94-11.4   OSF/Motif 2.1 implementation relea
ii  libc6                   2.3.5-6          GNU C Library: Shared libraries an
ii  libgcc1                 1:4.0.2-2        GCC support library
ii  libice6                 6.8.2.dfsg.1-7   Inter-Client Exchange library
ii  libsm6                  6.8.2.dfsg.1-7   X Window System Session Management
ii  libstdc++6              4.0.2-2          The GNU Standard C++ Library v3
ii  libx11-6                6.8.2.dfsg.1-7   X Window System protocol client li
ii  libxext6                6.8.2.dfsg.1-7   X Window System miscellaneous exte
ii  libxt6                  6.8.2.dfsg.1-7   X Toolkit Intrinsics
ii  transfig                1:3.2.5-alpha5-3 Utilities for converting XFig figu
ii  xlibs                   6.8.2.dfsg.1-7   X Window System client libraries m

tcm recommends no packages.

-- no debconf information
diff -u -r tcm-2.20+TSQD/src/dg/diagramwindow.c tcmneu/src/dg/diagramwindow.c
--- tcm-2.20+TSQD/src/dg/diagramwindow.c	2004-07-21 17:46:02.000000000 +0000
+++ tcmneu/src/dg/diagramwindow.c	2005-11-14 18:00:23.262244880 +0000
@@ -220,7 +220,7 @@
                 	XmNheight, 
 				GetIconsScrollHeight((nrNodes-1)/iconColumns + 1),
                 	XmNscrollingPolicy, XmAUTOMATIC,
-                	XmNscrollBarDisplayPolicy, XmAS_NEEDED, 0);
+                	XmNscrollBarDisplayPolicy, XmAS_NEEDED, NULL);
 
 		Widget clipWindow;
 		XtVaGetValues(scrolledWin, XmNclipWindow, &clipWindow, 0);
@@ -246,7 +246,7 @@
 			   // the first button is set by default
 			XmNset, i == 0? True: False, 
 			XmNhighlightThickness, 0,
-			XmNalignment, XmALIGNMENT_CENTER, 0);
+			XmNalignment, XmALIGNMENT_CENTER, NULL);
 		pixmap = nodeIcons[i].CreatePixmap(pb, GetDisplay());
 		XtVaSetValues(pb,
 			XmNlabelType, XmPIXMAP,
@@ -254,7 +254,7 @@
 			XmNuserData, (XtPointer)(i+1),
 					// determines widget for which the
 					// callback is involved.
-			0);
+			NULL);
 		XtAddCallback(pb, XmNvalueChangedCallback, 
 			DiagramStubs::SetNodeCB, (XtPointer)GetDocument());
 		AddLiteClue(pb, (char *)nodeNames[i]);
diff -u -r tcm-2.20+TSQD/src/ed/startupwindow.c tcmneu/src/ed/startupwindow.c
--- tcm-2.20+TSQD/src/ed/startupwindow.c	2005-11-14 17:47:28.674000192 +0000
+++ tcmneu/src/ed/startupwindow.c	2005-11-14 18:02:45.294652672 +0000
@@ -188,7 +188,7 @@
 		XmNtopWidget, menuBar,
 		XmNleftAttachment, XmATTACH_FORM, 
 		XmNbottomAttachment, XmATTACH_FORM, 
-		XmNrightAttachment, XmATTACH_FORM, 0);
+		XmNrightAttachment, XmATTACH_FORM, NULL);
 	mainForm = XtVaCreateWidget("form",
 		xmFormWidgetClass, scrolledWindow, 0);
 	// *** GEN *** //
@@ -266,7 +266,7 @@
 				XmNtopWidget, frameUML,
 				XmNleftAttachment, XmATTACH_FORM, 
 				XmNrightAttachment, XmATTACH_FORM,
-				0);
+				NULL);
 	XtVaCreateManagedWidget("Miscellaneous Editors", 
 			xmLabelWidgetClass, frameMISC,
 			XmNchildType, XmFRAME_TITLE_CHILD, 0);
@@ -289,7 +289,7 @@
 				XmNtopWidget, frameMISC,
 				XmNleftAttachment, XmATTACH_FORM,
 				XmNrightAttachment, XmATTACH_FORM,
-				0);
+				NULL);
 	int stColumns = 42;
 	if (WidthOfScreen(XtScreen(parent)) <= 1024)
 		// <= SVGA
@@ -302,7 +302,7 @@
 			XmNcolumns, stColumns, 
 			XmNtopAttachment, XmATTACH_FORM,
 			XmNrightAttachment, XmATTACH_FORM,
-			XmNleftAttachment, XmATTACH_FORM, 0);
+			XmNleftAttachment, XmATTACH_FORM, NULL);
 	XtManageChild(mainForm);
 	XtManageChild(scrolledWindow);
 	XtManageChild(parent);
@@ -374,7 +374,7 @@
 		XmNbottomAttachment, XmATTACH_FORM,
 		XmNleftAttachment, XmATTACH_FORM, 
 		XmNuserData, i,
-		0);
+		NULL);
 	strcpy(tt, Toolkit::DOCUMENT_TYPES[i]);
 	xmtt = CreateXmString(tt);
 	strcpy(ttinfo, Toolkit::DOCUMENT_TYPES_INFO[i]);
@@ -386,7 +386,7 @@
 		XmNtopAttachment, XmATTACH_FORM,
 		XmNbottomAttachment, XmATTACH_FORM,
 		XmNleftOffset, 6,
-		0);
+		NULL);
 	XtAddCallback(button, XmNactivateCallback, StartEditorCB, 
 			(XtPointer *)this);
 	XmStringFree(xmtt);
diff -u -r tcm-2.20+TSQD/src/sd/tr/trwindow.c tcmneu/src/sd/tr/trwindow.c
--- tcm-2.20+TSQD/src/sd/tr/trwindow.c	2004-07-21 17:55:43.000000000 +0000
+++ tcmneu/src/sd/tr/trwindow.c	2005-11-14 17:58:14.124876744 +0000
@@ -112,7 +112,7 @@
 			XmNlabelType, XmSTRING,
 			XmNlabelString, lb1,
 			XmNuserData, (XtPointer)0,
-			XmNalignment, XmALIGNMENT_CENTER, 0);
+			XmNalignment, XmALIGNMENT_CENTER, NULL);
 	XtAddCallback(editButton, XmNvalueChangedCallback,
 			TRWindow::LayoutCB, (XtPointer)this);
 	AddLiteClue(editButton, "Edit mode in which document is drawn as a graph");
@@ -123,7 +123,7 @@
 			XmNlabelType, XmSTRING,
 			XmNhighlightThickness, 0,
 			XmNuserData, (XtPointer)1,
-			XmNalignment, XmALIGNMENT_CENTER, 0);
+			XmNalignment, XmALIGNMENT_CENTER, NULL);
 	XtAddCallback(treeButton, XmNvalueChangedCallback,
 			TRWindow::LayoutCB, (XtPointer)this);
 	AddLiteClue(treeButton, "View mode in which document has a forked tree layout");
diff -u -r tcm-2.20+TSQD/src/ui/application.c tcmneu/src/ui/application.c
--- tcm-2.20+TSQD/src/ui/application.c	2004-07-21 17:48:37.000000000 +0000
+++ tcmneu/src/ui/application.c	2005-11-14 17:34:35.993465000 +0000
@@ -109,7 +109,7 @@
 				(char **)XResources::classicColorResources :
 		 		(char **)XResources::modernColorResources) :
 		 		(char **)XResources::monoResources,
-		    XmNmappedWhenManaged, False, 0));
+		    XmNmappedWhenManaged, False, NULL));
 	// The Application class is less likely to need to handle
 	// "surprise" widget destruction than other classes, but
 	// we might as well install a callback to be safe and consistent
diff -u -r tcm-2.20+TSQD/src/ui/mwidget.c tcmneu/src/ui/mwidget.c
--- tcm-2.20+TSQD/src/ui/mwidget.c	2004-07-21 17:48:02.000000000 +0000
+++ tcmneu/src/ui/mwidget.c	2005-11-14 17:34:21.128725000 +0000
@@ -67,7 +67,7 @@
 		liteClue = XtVaCreatePopupShell("LiteClueShell",
                         xcgLiteClueWidgetClass, GetWidget(),
                         XgcNwaitPeriod, 700,
-                        XgcNcancelWaitPeriod, 1000, 0);
+                        XgcNcancelWaitPeriod, 1000, NULL);
 }
 
 bool MWidget::IsRealized() {
diff -u -r tcm-2.20+TSQD/src/ui/ntogglelistdialog.c tcmneu/src/ui/ntogglelistdialog.c
--- tcm-2.20+TSQD/src/ui/ntogglelistdialog.c	2004-07-21 17:48:41.000000000 +0000
+++ tcmneu/src/ui/ntogglelistdialog.c	2005-11-14 17:38:32.593496000 +0000
@@ -98,7 +98,7 @@
 	 			xmToggleButtonWidgetClass, box,
 	 			XmNuserData, i,
 	 			XmNhighlightThickness, 0,
-	 			XmNset, i==0, 0);
+	 			XmNset, i==0, NULL);
 	 		toggles->add(w);
 		}
 		toggleList.add(toggles);
@@ -108,7 +108,7 @@
 			Widget w = XtVaCreateManagedWidget(s,
 	 			xmToggleButtonWidgetClass, rc2,
 	 			XmNhighlightThickness, 0,
-	 			XmNset, 0, 0);
+	 			XmNset, 0, NULL);
 			optionList.add(w);
 		}
 		XtManageChild(rc2);
diff -u -r tcm-2.20+TSQD/src/ui/textviewdialog.c tcmneu/src/ui/textviewdialog.c
--- tcm-2.20+TSQD/src/ui/textviewdialog.c	2004-07-21 17:48:24.000000000 +0000
+++ tcmneu/src/ui/textviewdialog.c	2005-11-14 17:40:21.552932000 +0000
@@ -89,7 +89,7 @@
 	XtVaSetValues(menuBar,
 	 	XmNtopAttachment, XmATTACH_FORM,
 	 	XmNleftAttachment, XmATTACH_FORM,
-	 	XmNrightAttachment, XmATTACH_FORM, 0);
+	 	XmNrightAttachment, XmATTACH_FORM, NULL);
 	fileMenu = new Menu(menuBar, Menu::PULLDOWN, "File", 0, fileItems);
 	editMenu = new Menu(menuBar, Menu::PULLDOWN, "Edit", 0, editItems);
 	searchMenu = new Menu(menuBar, Menu::PULLDOWN, "Search", 0, 

Reply via email to