From mboxrd@z Thu Jan 1 00:00:00 1970 Date: Thu, 9 Sep 1999 16:42:03 +0200 From: Maurice DIAMANTINI To: linuxppc-dev@lists.linuxppc.org, Maurice DIAMANTINI Subject: bug glibc strlen() or tcl8.2 Message-ID: <19990909164200.A17615@pmdiam.ensta.fr> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Sender: owner-linuxppc-dev@lists.linuxppc.org List-Id: Hello I'm unable to execute tcl8.2 on linuxppc R5. Although it compile and run very simply on intel box, solaris, ... but not on linuxppc The programm compils OK, but get a core dump at the first execution of a tcl command (in fact at the "make test") I've tried on the following environment : - PM7500 + update G3 - kernel 2.2.6 and: - PowerMac Blue G3 - 400MHz - rev 1 - kernel linux 2.2.10 provide by rshaw then: - PowerMac Blue G3 - 400MHz - rev 1 - kernel linux 2.2.10 provide by rshaw - with gcc-2.95.1 (+ the last binutils) built with the magic "make bootstrap" and installed into a separate directory. then: - PowerMac Blue G3 - 400MHz - rev 1 - kernel linux 2.2.10 provide by rshaw - with gcc-2.95.1 (+ the last binutils) built with the magic "make bootstrap" and installed into a separate directory. - upgrade to glibc-2.1.2-4a.ppc.rpm ######################################################################## Here ara my test which gdb and some fprintf added to the file tclResult.c: When I run tcltest: ---------------------- ./tcltest /home/diam/local/src/tcl/unix/../tests/all.tcl fprint before strlen fprint sizeof(tmpArgList)=12 make: *** [test] Error 139 ---------------------- gdb tcltest core GNU gdb 4.17.0.11 with Linux support Copyright 1998 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. Type "show copying" to see the conditions. There is absolutely no warranty for GDB. Type "show warranty" for details. This GDB was configured as "ppc-unknown-linux"... Core was generated by `./tcltest /home/diam/local/src/tcl/unix/../tests/all.tcl'. Program terminated with signal 11, Erreur de segmentation. Reading symbols from /home/diam/tmp/compil/tcl_linuxppc_build/libtcl8.2.so...done. Reading symbols from /lib/libdl.so.2...done. Reading symbols from /lib/libm.so.6...done. Reading symbols from /lib/libc.so.6...done. Reading symbols from /lib/ld.so.1...done. #0 0x161ac14 in Letext () at soinit.c:59 soinit.c:59: Aucun fichier ou répertoire de ce type. (gdb) ---------------------- (gdb) backtrace #0 0x161ac14 in Letext () at soinit.c:59 #1 0x17b2688 in Tcl_AppendResultVA () #2 0x17b2824 in Tcl_AppendResult () #3 0x17bfef4 in TclpOpenFileChannel () #4 0x179f49c in Tcl_OpenFileChannel () #5 0x179e088 in Tcl_OpenObjCmd () #6 0x1787f7c in TclExecuteByteCode () #7 0x176b90c in Tcl_EvalObjEx () #8 0x17b06b0 in TclObjInterpProc () #9 0x1787f7c in TclExecuteByteCode () #10 0x176b90c in Tcl_EvalObjEx () #11 0x17b06b0 in TclObjInterpProc () #12 0x1787f7c in TclExecuteByteCode () #13 0x176b90c in Tcl_EvalObjEx () #14 0x17b06b0 in TclObjInterpProc () #15 0x17a9528 in EvalObjv () #16 0x17a93b0 in EvalObjv () #17 0x17a9ce0 in Tcl_EvalEx () #18 0x17a9f10 in Tcl_Eval () #19 0x176d498 in Tcl_GlobalEval () #20 0x17ad80c in Tcl_PkgRequireEx () #21 0x17ad5f0 in Tcl_PkgRequire () #22 0x17ae0f4 in Tcl_PackageObjCmd () #23 0x1787f7c in TclExecuteByteCode () #24 0x176b90c in Tcl_EvalObjEx () #25 0x17725a0 in Tcl_IfObjCmd () #26 0x17a9528 in EvalObjv () #27 0x17a9ce0 in Tcl_EvalEx () #28 0x179f158 in Tcl_EvalFile () #29 0x17a2718 in Tcl_Main () #30 0x1802ea0 in main () #31 0x15dc3bc in Letext () at ../sysdeps/powerpc/elf/libc-start.c:106 (gdb) ---------------- Note that the previous glibc (firt release od linuxppc-R5) give: (gdb) backtrace #0 0x158e94c in strlen () at soinit.c:59 #1 0x17b25d0 in Tcl_AppendResultVA () #... #30 0x1802ea0 in main () #31 0x15507d4 in __libc_start_main () at ../sysdeps/powerpc/elf/libc-start.c:106 ######################################################################## In file tclResult.c: void Tcl_AppendResultVA (interp, argList) Tcl_Interp *interp; /* Interpreter with which to associate the * return value. */ va_list argList; /* Variable argument list. */ { Interp *iPtr = (Interp *) interp; va_list tmpArgList; char *string; int newSpace; /* * If the string result is empty, move the object result to the * string result, then reset the object result. */ if (*(iPtr->result) == 0) { Tcl_SetResult((Tcl_Interp *) iPtr, TclGetString(Tcl_GetObjResult((Tcl_Interp *) iPtr)), TCL_VOLATILE); } /* * Scan through all the arguments to see how much space is needed. */ memcpy ((VOID *) &tmpArgList, (VOID *) &argList, sizeof (tmpArgList)); newSpace = 0; while (1) { string = va_arg(tmpArgList, char *); if (string == NULL) { // diam : fprintf (stderr, "fprint before break\n"); break; } //////////////////////////////////////////////////////////////// // // diam : VVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV fprintf (stderr, "fprint before strlen\n"); // diam : fprintf (stderr, "fprint sizeof(tmpArgList)=%d\n", sizeof (tmpArgList)); newSpace += strlen(string); // diam : fprintf (stderr, "fprint after strlenstrlen\n"); // //////////////////////////////////////////////////////////////// } .... } ######################################################################## -- Maurice DIAMANTINI | Ecole Nationale Superieure de Techniques Avancees mailto:diam@ensta.fr | 32 Boulevard Victor 75739 PARIS Cedex 15 - France ** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/