From owner-bug-octave at bevo dot che dot wisc dot edu Tue Oct 31 00:33:40 1995 Subject: Applied patch. Better, but helpq crashes etc... From: John Eaton To: Mirsad Todorovac Cc: bug-octave at che dot utexas dot edu Date: Tue, 31 Oct 1995 00:31:13 -0600 Mirsad Todorovac wrote: : Thanks for the pointer to the patch. : Now it compiled without many problems, only some suspicious warnings : about something used before declared inline ... probably : not important. : Still, after mistyping command in command line or on breaking : output of the pager it crashes unfortunatelly. It looks like you are running into a bug in the libg++ procbuf class. Please try the following patch. Thanks, jwe >From jwe at bevo dot che dot wisc dot edu Wed Sep 20 01:48:07 CDT 1995 From: jwe at bevo dot che dot wisc dot edu (John Eaton) Newsgroups: gnu.g++.lib.bug Subject: procbuf problem on DEC alpha Date: 19 Sep 1995 23:30:20 -0400 Message-ID: <199509200329 dot WAA04570 at bevo dot che dot wisc dot edu> Using libg++ version 2.7.0 and g++ 2.7.0 on a DEC Alpha running OSF/1 3.2, I have had trouble with programs that attempted to use more than one procbuf. For example, the following program #include int main (void) { procbuf cmd ("ls -C", ios::in); procbuf pgr ("less", ios::out); char *s = "TEST"; while (*s) pgr.sputc (*s++); return 0; } crashes like this: bash$ ./foo Unaligned access pid=8164 va=140000854 pc=12000ba04 ra=12000941c type=ldq Unaligned access pid=8164 va=140000854 pc=12000b9f0 ra=12000941c type=ldq Unaligned access pid=8164 va=140000854 pc=12000b9fc ra=12000941c type=ldq Segmentation fault (core dumped) but works if the first procbuf declaration is commented out. The following patch seems to fix this problem: *** procbuf.h~ Thu Jun 15 22:42:28 1995 --- procbuf.h Tue Sep 19 21:59:18 1995 *************** *** 29,34 **** --- 29,35 ---- class procbuf : public filebuf { /* Following fields must match those in struct _IO_proc_file */ _IO_pid_t _pid; + void *space_holder_for_IO_proc_file_next_field; public: procbuf() : filebuf() { } procbuf(const char *command, int mode); Thanks, jwe