Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!ncar!ames!lll-winken!gauss.llnl.gov!casey From: casey@gauss.llnl.gov (Casey Leedom) Newsgroups: comp.windows.x Subject: Re: xterm on sun3 Message-ID: <47481@lll-winken.LLNL.GOV> Date: 6 Feb 90 07:48:06 GMT References: Sender: usenet@lll-winken.LLNL.GOV Reply-To: casey@gauss.llnl.gov.UUCP (Casey Leedom) Organization: Lawrence Livermore National Laboratory Lines: 55 | From: dl2n+@ANDREW.CMU.EDU (Daniel Edward Lovinger) | | Gcc 1.36 is your problem. Suggestion - wait for gcc 1.37, or back out | your version of gcc to 1.35. Something is tripping one of the few | remaining bugs in there somewhere. GCC is not the problem. Unless you want to call it putting strings in read-only storage by default a bug. The problem is that xterm is trying to overwrite a string in read-only storage and getting the segmentation violation then. You can wait for new GCC releases until your face turns blue, but it won't help you unless GCC decides to put strings into read/write storage by default. Someone else already posted their fix for this, here's mine: *** mit/clients/xterm/Tekproc.c-dist Fri Dec 22 08:40:41 1989 --- mit/clients/xterm/Tekproc.c Mon Feb 5 23:48:24 1990 *************** *** 1287,1295 **** screen->cur.fontsize = TEK_FONT_LARGE; if (tw->tek.initial_font) { ! char *s = tw->tek.initial_font; ! XmuCopyISOLatin1Lowered (s, s); if (strcmp (s, "large") == 0) screen->cur.fontsize = TEK_FONT_LARGE; else if (strcmp (s, "2") == 0 || strcmp (s, "two") == 0) --- 1287,1298 ---- screen->cur.fontsize = TEK_FONT_LARGE; if (tw->tek.initial_font) { ! char *s; ! s = malloc(strlen(tw->tek.initial_font)+1); ! if (s == NULL) ! Panic("TekRealize: malloc error (%d)\n", errno); ! XmuCopyISOLatin1Lowered (s, tw->tek.initial_font); if (strcmp (s, "large") == 0) screen->cur.fontsize = TEK_FONT_LARGE; else if (strcmp (s, "2") == 0 || strcmp (s, "two") == 0) *************** *** 1298,1303 **** --- 1301,1307 ---- screen->cur.fontsize = TEK_FONT_3; else if (strcmp (s, "small") == 0) screen->cur.fontsize = TEK_FONT_SMALL; + free(s); } gcv.graphics_exposures = TRUE; /* default */ Alternatively, you can simply compile Tekproc.c with -fwriteable-strings. Casey