ports/149066: print/gv: Segmentation fault when using "Print Marked" button

Thomas Mueller tmueller at sysgo.com
Thu Jul 29 13:00:14 UTC 2010


>Number:         149066
>Category:       ports
>Synopsis:       print/gv: Segmentation fault when using "Print Marked" button
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Thu Jul 29 13:00:13 UTC 2010
>Closed-Date:
>Last-Modified:
>Originator:     Thomas Mueller
>Release:        RELENG_8
>Organization:
>Environment:
FreeBSD tom.ulm.sysgo.com 8.1-STABLE FreeBSD 8.1-STABLE #15: Wed Jul 28 19:12:29 CEST 2010     toor at tom.ulm.sysgo.com:/usr/obj/usr/src/sys/TOM  amd64
>Description:
Using the "Print Marked" button produces the a core dump
on my system.

(gdb) run Assigned.ps
Starting program: /tmp/gv Assigned.ps

Program received signal SIGBUS, Bus error.
DialogPopupSetText (s=0x801e7a09c "lpr") at dialog.c:302
302           XtSetArg(args[n], XtNfont, &font);        n++;
(gdb) bt
#0  DialogPopupSetText (s=0x801e7a09c "lpr") at dialog.c:302
#1  0x00000000004149af in cb_print (w=Variable "w" is not available.
) at callbacks.c:636
#2  0x0000000800b27d9f in XtCallCallbackList () from /usr/local/lib/libXt.so.6
#3  0x0000000800b5d616 in HandleActions () from /usr/local/lib/libXt.so.6
#4  0x0000000800b5da23 in HandleSimpleState () from /usr/local/lib/libXt.so.6
#5  0x0000000800b5e0aa in _XtTranslateEvent () from /usr/local/lib/libXt.so.6
#6  0x0000000800b3597a in XtDispatchEventToWidget ()
   from /usr/local/lib/libXt.so.6
#7  0x0000000800b35f96 in _XtDefaultDispatcher ()
   from /usr/local/lib/libXt.so.6
#8  0x0000000800b350b8 in XtDispatchEvent () from /usr/local/lib/libXt.so.6
#9  0x0000000800b35243 in XtAppMainLoop () from /usr/local/lib/libXt.so.6
#10 0x000000000041ad24 in main (argc=2, argv=Variable "argv" is not available.
) at main.c:1349
(gdb) p n
$1 = 4403287

Variable 'n' is used uninitialized in dialog.c:DialogPopupSetText():

gmake[2]: Entering directory `/usr/ports/print/gv/work/gv-3.6.9/src'
cc -DHAVE_CONFIG_H -I.  -DNON_BLOCKING_IO -DGV_CODE -DGV_LIBDIR=\"/usr/local/share/gv\" -I../lib -I../lib -g -I/usr/local/include -DUSE_SETENV_CODE -I/usr/local/include  -O2 -g -Wall -pipe -fno-strict-aliasing -MT dialog.o -MD -MP -MF .deps/dialog.Tpo -c -o dialog.o dialog.c
dialog.c: In function 'DialogPopupSetText':
dialog.c:302: warning: 'n' is used uninitialized in this function

>How-To-Repeat:
Display a PostScript file, mark some pages, press the "Print Marked" button.
>Fix:
[root at tom /usr/ports/print/gv]# diff -up work/gv-3.6.9/src/dialog.c.ORG   work/gv-3.6.9/src/dialog.c 
--- work/gv-3.6.9/src/dialog.c.ORG      2010-07-29 14:46:47.059160869 +0200
+++ work/gv-3.6.9/src/dialog.c  2010-07-29 14:47:04.707360221 +0200
@@ -292,9 +292,9 @@ void DialogPopupSetText(s)
     if (!s) {INFMESSAGE(no text) ENDMESSAGE(DialogPopupSetText) return;}
     if (!dialogPopupCreated) makeDialogPopup();
     response = XtNameToWidget(DIALOG_POPUP, "*dialog_text");
+    n=0;
 #ifdef HAVE_XAW3D_INTERNATIONAL
     vw = (VlistWidget)response;
-                                               n=0;
     if( vw->simple.international == True ) {
       XtSetArg(args[n], XtNfontSet, &fontset); n++;
     } else {


>Release-Note:
>Audit-Trail:
>Unformatted:



More information about the freebsd-ports-bugs mailing list