I am building tcl and tclx on sparc solaris 8 using Sun C compiler.
I am configuring with options \"'--prefix=/vol/tclsrcsol/tcl85test' '-enable-shared' '--enable-symbols' '--enable-stubs' 'CC=/opt/SUNWspro/bin/cc'\"
Tcl 8.5.4 formal release configured and built. Then I ran the Tcl test suite and received no errors.
I am using the file tclx-20080629.tar.gz from the ActiveState tcl cvs snapshot ftp site.
I built it with the same options above.
During the build, I see in tclXsocket.c a warning about a reference to bcopy that is an implicit function declaration. The sun man page for bcopy mentions "strings.h" as the header for bcopy.
In tclXunixSock.c, there is an implicit function declaration for bzero as well as these prototype warnings:
prototype: pointer to function(pointer to void, pointer to struct Tcl_In
terp {pointer to char result, pointer to function(..) returning void freeProc, i
nt errorLine}, int, pointer to pointer to const char) returning int : "unknown",
line 0
argument : pointer to function(pointer to void, pointer to struct Tcl_In
terp {pointer to char result, pointer to function(..) returning void freeProc, i
nt errorLine}, int, pointer to pointer to char) returning int
"tclXunixSock.c", line 365: warning: argument #3 is incompatible with prototype:
prototype: pointer to function(pointer to void, pointer to struct Tcl_In
terp {pointer to char result, pointer to function(..) returning void freeProc, i
nt errorLine}, int, pointer to pointer to const char) returning int : "unknown",
line 0
argument : pointer to function(pointer to void, pointer to struct Tcl_In
terp {pointer to char result, pointer to function(..) returning void freeProc, i
nt errorLine}, int, pointer to pointer to char) returning int
When I run the test suite, I get these errors:
cmdtrace.test
==== cmdtrace-1.2 command trace: not evaluated, truncated FAILED
==== Contents of test case:
set cmdtraceFH [open CMDTRACE.OUT w+]
cmdtrace on $cmdtraceFH noeval
DoStuff4
cmdtrace off
GetTrace $cmdtraceFH
---- Result was:
DoStuff4
DoStuff3
DoStuff2
DoStuff1
DoStuff
replicate "-TheString-" 10
set foo [replicate "-TheString-" 10]
set baz $foo
set wap 1
if {$wap} {\n set wap 0\n } else {\n set wap 1...
set wap 0
cmdtrace off
---- Result should have been (exact matching):
DoStuff4\n
DoStuff3
DoStuff2
DoStuff1
DoStuff
replicate "-TheString-" 10
set foo [replicate "-TheString-" 10]
set baz $foo
set wap 1
if {$wap} {\n set wap 0\n } else {\n set wap 1...
set wap 0
cmdtrace off\n
==== cmdtrace-1.2 FAILED
==== cmdtrace-1.4 command trace: not evaluated, not truncated FAILED
==== Contents of test case:
set cmdtraceFH [open CMDTRACE.OUT w+]
cmdtrace on $cmdtraceFH notruncate noeval
DoStuff4
cmdtrace off
GetTrace $cmdtraceFH
---- Result was:
DoStuff4
DoStuff3
DoStuff2
DoStuff1
DoStuff
replicate "-TheString-" 10
set foo [replicate "-TheString-" 10]
set baz $foo
set wap 1
if {$wap} {\n set wap 0\n } else {\n set wap 1\n }
set wap 0
cmdtrace off
---- Result should have been (exact matching):
DoStuff4\n
DoStuff3
DoStuff2
DoStuff1
DoStuff
replicate "-TheString-" 10
set foo [replicate "-TheString-" 10]
set baz $foo
set wap 1
if {$wap} {\n set wap 0\n } else {\n set wap 1\n }
set wap 0
cmdtrace off\n
==== cmdtrace-1.4 FAILED
==== cmdtrace-3.1 command trace argument error checking FAILED
==== Contents of test case:
set errorInfo ERRORINFO
set errorCode ERRORCODE
cmdtrace on command "ctcallback CD"
DoStuff4
cmdtrace off
lappend traceout $errorInfo $errorCode
set traceout
---- Result was:
{CD DoStuff4 DoStuff4 {}} {CD DoStuff3 DoStuff3 {}} {CD DoStuff2 DoStuff2 {}} {C
D DoStuff1 DoStuff1 {}} {CD DoStuff DoStuff {}} {CD {{replicate "-TheString-" 10
}} {{replicate -TheString- 10}} {}} {CD {{set foo [replicate "-TheString-" 10]}}
{{set foo -TheString--TheString--TheString--TheString--TheString--TheString--Th
eString--TheString--TheString--TheString-}} {}} {CD {{set baz $foo}} {{set baz -
TheString--TheString--TheString--TheString--TheString--TheString--TheString--The
String--TheString--TheString-}} {}} {CD {{set wap 1}} {{set wap 1}} {}} {CD {{if
{$wap} {
set wap 0
} else {
set wap 1
}}} {{if {$wap} {
set wap 0
} else {
set wap 1
}}} {}} {CD {{set wap 0}} {{set wap 0}} {}} {CD {{cmdtrace off}} {{cmdtrace
off}} {}} ERRORINFO ERRORCODE
---- Result should have been (exact matching):
{CD {{DoStuff4
}} DoStuff4 {}} {CD DoStuff3 DoStuff3 {}} {CD DoStuff2 DoStuff2 {}} {CD DoStuff1
DoStuff1 {}} {CD DoStuff DoStuff {}} {CD {{replicate "-TheString-" 10}} {{repli
cate -TheString- 10}} {}} {CD {{set foo [replicate "-TheString-" 10]}} {{set foo
-TheString--TheString--TheString--TheString--TheString--TheString--TheString--T
heString--TheString--TheString-}} {}} {CD {{set baz $foo}} {{set baz -TheString-
-TheString--TheString--TheString--TheString--TheString--TheString--TheString--TheString--TheString-}} {}} {CD {{set wap 1}} {{set wap 1}} {}} {CD {{if {$wap} {
set wap 0
} else {
set wap 1
}}} {{if {$wap} {
set wap 0
} else {
set wap 1
}}} {}} {CD {{set wap 0}} {{set wap 0}} {}} {CD {{cmdtrace off
}} {{cmdtrace off}} {}} ERRORINFO ERRORCODE
==== cmdtrace-3.1 FAILED
and then
msgcat.test
==== message-cat-1.3 catopen tests FAILED
==== Contents of test case:
list [catch {catopen -fail "FOOBAZWAP"} msg] $msg
switch -exact $msg {
"open of message catalog failed" -
"the message catalog facility is not available, default string is always
returned" {concat "OK"}
default {
# This will fail on Linux and FreeBSD, where the catopen libc
# function exhibits non-standard behavior. This is should not be
# a problem for most developers, so fake the OK.
if {[regexp Linux|FreeBSD $::tcl_platform(os)] && ($msg == "msgcat0
")} {
concat "OK"
} else {
concat "Bad catopen return: $msg"
}
}
}
---- Result was:
Bad catopen return: msgcat0
---- Result should have been (exact matching):
OK
==== message-cat-1.3 FAILED
and finally
profile.test
gmake: *** [test] Segmentation Fault (core dumped)
and here's the stack trace
$ dbx /vol/tclsrcsol/tcl85/tcl/unix/tclsh core
For information about new features see `help changes'
To remove this message, put `dbxenv suppress_startup_message 7.0' in your .dbxrc
Reading tclsh
core file header read successfully
Reading ld.so.1
Reading libtcl8.5.so
Reading libdl.so.1
Reading libsocket.so.1
Reading libnsl.so.1
Reading libm.so.1
Reading libc.so.1
Reading libmp.so.2
Reading libc_psr.so.1
Reading libtclx8.4.so
Reading nss_files.so.1
program terminated by signal SEGV (no mapping at the fault address)
Current function is InitializeProcStack
686 UNKNOWN_LEVEL);
(dbx 1) where
=>[1] InitializeProcStack(infoPtr = 0xf1408, framePtr = 0x2bc20), line 686 in "tclXprofile.c"
[2] TurnOnProfiling(infoPtr = 0xf1408, commandMode = 0, evalMode = 0), line 729 in "tclXprofile.c"
[3] TclX_ProfileObjCmd(clientData = 0xf1408, interp = 0x2b6d8, objc = 2, objv = 0x2c180), line 895 in "tclXprofile.c"
[4] TclEvalObjvInternal(interp = 0x2b6d8, objc = 2, objv = 0x2c180, command = 0x249356 "profile on\nProcA1\nprofile off profData\nforeach idx [array names profData] {\n if {[string match "::ProcA1 *" $idx]} break\n}\n\nif {([lindex $profData($idx) 1] == 0) && \\n ![cequal $tcl_platform(platform) windows]} {\n puts "*** The profile command is returning real time values of"\n puts "*** zero. This suggests that your `times' system call does"\n puts "*** not return elapsed real time. The configure script"\n puts "*** did not properly detect this. Try undefining the flag"\n puts "***" ..., length = 11, flags = 0), line 3690 in "tclBasic.c"
[5] TclEvalEx(interp = 0x2b6d8, script = 0x248f18 "#\n# profile.test\n#\n# Tests for the profile command and profrep procedure.\n#------------------------------------------------------------------------------\n# Copyright 1992-1999 Karl Lehenbauer and Mark Diekhans.\n#\n# Permission to use, copy, modify, and distribute this software and its\n# documentation for any purpose and without fee is hereby granted, provided\n# that the above copyright notice appear in all copies. Karl Lehenbauer and\n# Mark Diekhans make no representations about the suitability of this\n# so" ..., numBytes = 24800, flags = 0, line = 27), line 4339 in "tclBasic.c"
[6] Tcl_EvalEx(interp = 0x2b6d8, script = 0x248f18 "#\n# profile.test\n#\n# Tests for the profile command and profrep procedure.\n#------------------------------------------------------------------------------\n# Copyright 1992-1999 Karl Lehenbauer and Mark Diekhans.\n#\n# Permission to use, copy, modify, and distribute this software and its\n# documentation for any purpose and without fee is hereby granted, provided\n# that the above copyright notice appear in all copies. Karl Lehenbauer and\n# Mark Diekhans make no representations about the suitability of this\n# so" ..., numBytes = 24800, flags = 0), line 4043 in "tclBasic.c"
[7] Tcl_FSEvalFileEx(interp = 0x2b6d8, pathPtr = 0x159fc8, encodingName = (nil)), line 1820 in "tclIOUtil.c"
[8] Tcl_SourceObjCmd(dummy = (nil), interp = 0x2b6d8, objc = 2, objv = 0x2bfc0), line 955 in "tclCmdMZ.c"
[9] TclEvalObjvInternal(interp = 0x2b6d8, objc = 2, objv = 0x2bfc0, command = 0xffffffff "", length = -1, flags = 0), line 3690 in "tclBasic.c"
[10] TclExecuteByteCode(interp = 0x2b6d8, codePtr = 0x1a10e8), line 2341 in "tclExecute.c"
[11] TclCompEvalObj(interp = 0x2b6d8, objPtr = 0x187f60, invoker = 0x2bf60, word = 1), line 1474 in "tclExecute.c"
[12] TclEvalObjEx(interp = 0x2b6d8, objPtr = 0x187f60, flags = 0, invoker = 0x2bf60, word = 1), line 5095 in "tclBasic.c"
[13] Tcl_CatchObjCmd(dummy = (nil), interp = 0x2b6d8, objc = 3, objv = 0x2bf88), line 253 in "tclCmdAH.c"
[14] TclEvalObjvInternal(interp = 0x2b6d8, objc = 3, objv = 0x2bf88, command = 0xffffffff "", length = -1, flags = 0), line 3690 in "tclBasic.c"
[15] TclExecuteByteCode(interp = 0x2b6d8, codePtr = 0xa5d78), line 2341 in "tclExecute.c"
[16] TclCompEvalObj(interp = 0x2b6d8, objPtr = 0x159f68, invoker = 0x2bdf8, word = 3), line 1474 in "tclExecute.c"
[17] TclEvalObjEx(interp = 0x2b6d8, objPtr = 0x159f68, flags = 0, invoker = 0x2bdf8, word = 3), line 5095 in "tclBasic.c"
[18] Tcl_ForeachObjCmd(dummy = (nil), interp = 0x2b6d8, objc = 4, objv = 0x2be28), line 1818 in "tclCmdAH.c"
[19] TclEvalObjvInternal(interp = 0x2b6d8, objc = 4, objv = 0x2be28, command = 0x46c61 "foreach file [lsort [::tcltest::getMatchingFiles]] {\n set tail [file tail $file]\n puts stdout $tail\n if {[catch {source $file} msg]} {\n^Iputs stdout $msg\n }\n}\n\n# cleanup\nputs stdout "\nTests ended at [eval $timeCmd]"\n::tcltest::cleanupTests 1\nreturn\n\nif 0 {\n proc eq {a b} { cequal $a $b }\n proc eq1 {a b} { string equal $a $b }\n proc eq2 {a b} { foo $a $b}\n interp alias {} foo {} string equal\n set a [string repeat a 50]b\n set b [string repeat a 50]b\n set c [string repeat a 50]" ..., length = 170, flags = 0), line 3690 in "tclBasic.c"
[20] TclEvalEx(interp = 0x2b6d8, script = 0x46700 "# all.tcl --\n#\n# This file contains a top-level script to run all of the Tcl\n# tests. Execute it by invoking "source all.test" when running tcltest\n# in this directory.\n#\n# RCS: @(#) $Id: all.tcl,v 1.2 2002/04/02 02:29:43 hobbs Exp $\n\nif {[lsearch [namespace children] ::tcltest] == -1} {\n package require tcltest\n namespace import ::tcltest::*\n}\n\nset ::tcltest::testSingleFile false\nset ::tcltest::testsDirectory [file dir [info script]]\n\n# We need to ensure that the testsDirectory is absolute\n::tcltest" ..., numBytes = 1934, flags = 0, line = 43), line 4339 in "tclBasic.c"
[21] Tcl_EvalEx(interp = 0x2b6d8, script = 0x46700 "# all.tcl --\n#\n# This file contains a top-level script to run all of the Tcl\n# tests. Execute it by invoking "source all.test" when running tcltest\n# in this directory.\n#\n# RCS: @(#) $Id: all.tcl,v 1.2 2002/04/02 02:29:43 hobbs Exp $\n\nif {[lsearch [namespace children] ::tcltest] == -1} {\n package require tcltest\n namespace import ::tcltest::*\n}\n\nset ::tcltest::testSingleFile false\nset ::tcltest::testsDirectory [file dir [info script]]\n\n# We need to ensure that the testsDirectory is absolute\n::tcltest" ..., numBytes = 1934, flags = 0), line 4043 in "tclBasic.c"
[22] Tcl_FSEvalFileEx(interp = 0x2b6d8, pathPtr = 0x3d1d0, encodingName = (nil)), line 1820 in "tclIOUtil.c"
[23] Tcl_Main(argc = -1, argv = 0xffbee4c4, appInitProc = 0x11328 = &Tcl_AppInit(Tcl_Interp *interp)), line 441 in "tclMain.c"
[24] main(argc = 2, argv = 0xffbee4bc), line 87 in "tclAppInit.c"
list 671,687
671 static void
672 InitializeProcStack (infoPtr, framePtr)
673 profInfo_t *infoPtr;
674 CallFrame *framePtr;
675 {
676 if (framePtr == NULL)
677 return;
678 InitializeProcStack (infoPtr, framePtr->callerPtr);
679
680
681 PushEntry (infoPtr,
682 Tcl_GetStringFromObj (framePtr->objv [0], NULL),
683 TRUE,
684 infoPtr->stackPtr->procLevel + 1,
685 framePtr->level,
686 UNKNOWN_LEVEL);
687 }
I am seeing the seg-fault crash in profile.test as well. I'm on FreeBSD/amd64 (64 bit), compiling against Tcl-8.5.5.
I wish, Purify was available for FreeBSD, but it IS available for Solaris...
I am seeing the seg-fault crash in profile.test as well. I'm on FreeBSD/amd64 (64 bit), compiling against Tcl-8.5.5.
I wish, Purify was available for FreeBSD, but it IS available for Solaris...
problems continue to be exhibited even against tcl 8.5.6.
The profile-crash is now fixed. Use the patch attached to artifact 1925400:
https://sourceforge.net/tracker/index.php?func=detail&aid=1925400&group_id=13247&atid=113247
Other self-tests break mostly because the core Tcl changed wordings of its error messages...