Subject: Re: "UpdateStringProc" panic and core dump under AIX and 8.1 - DN [1]


Paul Duffin <pduffin@mailserver.hursley.ibm.com> - 27 Jul 1999 - comp.lang.tcl

 Bill Schongar wrote:
 >
 > Paul Duffin wrote:
 >
 > >What level of Tcl, and what level of compiler ?
 >
 > 8.1.1, both with and without the Plus Patch.
 >
 > To be honest, I have no idea which version of the compiler
 > it is - the man pages on that system were unreliable,
 > and things like 'cc -V', 'cc -version', etc didn't tell me anything.
 >

 Run
     lslpp -L \*xlC\*

 > >Run `dump -H` on the executable and library to see what libraries are
 > >being loaded, are they correct ?
 >
 > --
 > tclsh:
 >
 >                         ***Import File Strings***
 > INDEX  PATH                          BASE                MEMBER
 > 0      /home/user/update2000/tcl8.1.1/unix:/usr/local/lib:/usr/lib:/lib
 > 1                                    libc.a              shr.o
 > 2                                    libbsd.a            shr.o
 > 3                                    libdl.a             shr.o
 > --
 >
 > It seems so..  the local 4.2 box I have shows the same thing,
 > with an additional path entry, but the same libs.
 >

 It looks to me as though it is missing the Tcl library.
 When I run it against tclsh81 I get

 /local/tcl8.1/bin/tclsh8.1:

                         ***Import File Strings***
 INDEX  PATH                          BASE                MEMBER
 0      /local/tcl8.1/lib:/usr/lib:/lib
 1                                    libc.a              shr.o
 2                                    libtcl8.1.so

 and when I run it against libtcl8.1.so I get

 /local/tcl8.1/lib/libtcl8.1.so:

                         ***Import File Strings***
 INDEX  PATH                          BASE                MEMBER
 0      /usr/lib:/lib
 1                                    libc.a              shr.o
 2                                    libbsd.a            shr.o

 > [snipped stack]
 >
 > Tcl_AppInit(??) at 0x10000230
 > Tcl_Main(??, ??, ??) at 0x100007d4
 > main(??, ??) at 0x100001e8
 > --
 >
 > I get the feeling all those question marks are a bad thing...
 >

 The ?? are just markers because Tcl has not been built with symbols.
 I would recommend that you rebuild Tcl with both symbols and memory
 debugging turned on. To turn symbols on you need to change the Makefile
 so it sets CFLAGS to CFLAGS_DEBUG and not CFLAGS_OPTIMISE, to turn
 memory debugging on you need to change the Makefile so it sets
 MEM_DEBUG_FLAGS to -DTCL_MEM_DEBUG. Once you have done this clean out
 the installation and rebuild it.

 You may need to rebuild your extension if it uses the ckalloc/... for
 its memory allocation. If it uses Tcl_Alloc/... then you don't.

 > >The problem you are seeing is probably due to Tcl_GetStringFromObj
 > >being called on a NULL Tcl_Obj pointer.
 >
 > Would this be due to something configured wrong in the Makefile,
 > such as using fixstrtod when it shouldn't? Or a compiler-specific
 > change? I'm just not sure what to try...
 >

 It could be an optimisation thing, although I have never run across any
 problems with optimisation on AIX, or a real bug.

 > My big concern is that I only have gcc to test with locally,
 > and that works fine, but at the remote site they exclusively use
 > the IBM C++ set compilers. And of course they're locked away
 > behind a firewall... argh!
 >
 > I'm just used to my code being what breaks, not the Tcl core. : )
 >

 Hope this helps.

 --
 Paul Duffin
 DT/6000 Development    Email: pduffin@hursley.ibm.com
 IBM UK Laboratories Ltd., Hursley Park nr. Winchester
 Internal: 7-246880    International: +44 1962-816880

Last modified
1999-09-27

(195.108.246.50)

Note: you are looking at
the snapshot of an old wiki
- much of this information
is likely to be very outdated