Tclsh dumps core when performing array set
Deleted218858ffffffffffffffffffffffffffffffffffCreated 26 years agoUpdated 26 years ago
Descriptionplain2000-10-26 01:06:46
OriginalBugID: 2427 Bug
Version: 8.2b1
SubmitDate: '1999-07-21'
LastModified: '1999-07-22'
Severity: CRIT
Status: Released
Submitter: techsupp
ChangedBy: redman
OS: Solaris
OSVersion: SunOS sssue450 5.5.1 Generic_103640-24 sun4u sparc SUNW,Ultra-4
Machine: Other
FixedDate: '1999-07-22'
FixedInVersion: 8.2b2
ClosedDate: '2000-10-25'
Name:
Jay Schmidgall
ReproducibleScript:
array set anArray(anArrayElement) {}
causes a segmentation violation in tcl8.2b1 as well as tcl8.1.1
ObservedBehavior:
sssue450:.../tclhttpd2.2/lib> ~/bin/sun-elf/bin/tclsh8.2
% array set foo(foo) {}
Segmentation fault (core dumped)
sssue450:.../tclhttpd2.2/lib> dbx ~/bin/sun-elf/bin/tclsh8.2 core
Reading symbolic information for /home/fos/jay/bin/sun-elf/bin/tclsh8.2
core file header read successfully
Reading symbolic information for rtld /usr/lib/ld.so.1
Reading symbolic information for /home/fos/jay/lib/libtcl8.2.so
Reading symbolic information for /lib/libdl.so.1
Reading symbolic information for /lib/libsocket.so.1
Reading symbolic information for /lib/libnsl.so.1
Reading symbolic information for /lib/libm.so.1
Reading symbolic information for /lib/libc.so.1
Reading symbolic information for /lib/libintl.so.1
Reading symbolic information for /lib/libmp.so.1
Reading symbolic information for /lib/libw.so.1
Reading symbolic information for
/usr/platform/SUNW,Ultra-4/lib/libc_psr.so.1
program terminated by signal SEGV (no mapping at the fault address)
Current function is TclArraySet
3261 TclSetVarArray(varPtr);
(dbx) where
=>[1] TclArraySet(interp = 0x23798, arrayNameObj = 0x2ae60, arrayElemObj
= 0x231b0), line 3261 in
"/home/fos/jay/src/tcl8.2b1/unix/../generic/tclVar.c"
[2] Tcl_ArrayObjCmd(dummy = (nil), interp = 0x23798, objc = 4, objv =
0x259b0), line 3108 in
"/home/fos/jay/src/tcl8.2b1/unix/../generic/tclVar.c"
[3] TclExecuteByteCode(interp = 0x23798, codePtr = 0x2a498), line 844
in "/home/fos/jay/src/tcl8.2b1/unix/../generic/tclExecute.c"
[4] Tcl_EvalObjEx(interp = 0x23798, objPtr = 0x2b3d0, flags = 0), line
2698 in "/home/fos/jay/src/tcl8.2b1/unix/../generic/tclBasic.c"
[5] Tcl_RecordAndEvalObj(interp = 0x23798, cmdPtr = 0x2b3d0, flags =
0), line 142 in
"/home/fos/jay/src/tcl8.2b1/unix/../generic/tclHistory.c"
[6] Tcl_Main(argc = 1, argv = 0xeffff9c4, appInitProc =
&Tcl_AppInit(Tcl_Interp *interp) at 0x10ab8), line 236 in
"/home/fos/jay/src/tcl8.2b1/unix/../generic/tclMain.c"
[7] main(argc = 1, argv = 0xeffff9c4), line 83 in
"/home/fos/jay/src/tcl8.2b1/unix/../unix/tclAppInit.c"
(dbx)
DesiredBehavior:
sssue450:.../tclhttpd2.2/lib> ~/bin/sun-elf/bin/tclsh8.2
% array set foo(foo) {}
%
or perhaps
sssue450:.../tclhttpd2.2/lib> ~/bin/sun-elf/bin/tclsh8.2
% array set foo(foo) {}
can't set "foo(foo)": variable isn't array
which would be similar to
% array set foo(foo) { bar baz }
can't set "foo(foo)(bar)": variable isn't array
This is definitely a bug.
-- 07/22/1999 redman
Fixed the problem, now gives an error for "array set a(b) {}"
-- 07/22/1999 redman
welch Deleted ticket [218858ffff].
[History diff]2000-10-26 08:30:14
dgp Ticket [218858ffff]: 3 changes
[History diff]2001-04-18 21:45:44
Log in (anonymous is fine) to add a comment.