Skip to content
Tcl Source Code View Ticket
Login

View Ticket

2009-06-09
09:20 • Closed ticket [2796438fff]: Segmentation fault on AIX plus 6 other changes artifact: 5abc74f8af user: sf-robot
2009-05-25
23:09 • Pending ticket [2796438fff]. artifact: c8ce0164e8 user: hobbs
13:53 • New ticket [2796438fff]. artifact: f89c5ba41a user: ogudikov

Segmentation fault on AIX

Closed / Invalid2796438fffffffffffffffffffffffffffffffffCreated 18 years agoUpdated 17 years ago
Descriptionplain2009-05-25 13:53:46
Tcl 8.5.7, Tcl 8.6.1b1

AIX 5.2
-------------------------------------------------------------------------------------
Tcl was configured with the following arguments:
./configure --prefix=<prefix> --exec-prefix=<prefix>/bin/aix --enable-threads --enable-symbols --enable-64bit --enable-man-symlinks

-------------------------------------------------------------------------------------

Sample session.
08:28:37 > tclsh8.5
% info
Segmentation fault (core dumped)

-------------------------------------------------------------------------------------

Investigation of core.
08:41:33 > dbx $(which tclsh8.5)
Type 'help' for help.
[using memory image in core]
reading symbolic information ...

Segmentation fault in TclExecuteByteCode at line 1907 in file "tcl8.5.7/unix/../generic/tclExecute.c" ($t1)
 1907       if (*pc == INST_LOAD_SCALAR1) {

(dbx) where
TclExecuteByteCode(interp = 0x0000000110067d40, codePtr = 0x00000001100cc400), line 1907 in "tclExecute.c"
unnamed block $b1496, line 1748 in "tclProc.c"
TclObjInterpProcCore(interp = 0x0000000110067d40, procNameObj = 0x0000000110065a60, skip = 1, errorProc = 0x09001000a0238380), line 1748 in "tclProc.c"
TclObjInterpProc(clientData = 0x00000001100971e0, interp = 0x0000000110067d40, objc = 1, objv = 0x000000011006c310), line 1642 in "tclProc.c"
unnamed block $b14, line 3690 in "tclBasic.c"
TclEvalObjvInternal(interp = 0x0000000110067d40, objc = 1, objv = 0x000000011006c310, command = warning: Unable to access address 0xffffffffffffffff from core
(invalid char ptr (0xffffffffffffffff)), length = -1, flags = 0), line 3690 in "tclBasic.c"
unnamed block $b888, line 2348 in "tclExecute.c"
unnamed block $b886, line 2348 in "tclExecute.c"
TclExecuteByteCode(interp = 0x0000000110067d40, codePtr = 0x00000001100b62c0), line 2348 in "tclExecute.c"
unnamed block $b1496, line 1748 in "tclProc.c"
TclObjInterpProcCore(interp = 0x0000000110067d40, procNameObj = 0x0000000110063f90, skip = 1, errorProc = 0x09001000a0238380), line 1748 in "tclProc.c"
TclObjInterpProc(clientData = 0x0000000110096f60, interp = 0x0000000110067d40, objc = 3, objv = 0x000000011006c180), line 1642 in "tclProc.c"
unnamed block $b14, line 3690 in "tclBasic.c"
TclEvalObjvInternal(interp = 0x0000000110067d40, objc = 3, objv = 0x000000011006c180, command = warning: Unable to access address 0xffffffffffffffff from core
(invalid char ptr (0xffffffffffffffff)), length = -1, flags = 0), line 3690 in "tclBasic.c"
unnamed block $b888, line 2348 in "tclExecute.c"
unnamed block $b886, line 2348 in "tclExecute.c"
TclExecuteByteCode(interp = 0x0000000110067d40, codePtr = 0x00000001100b0ea0), line 2348 in "tclExecute.c"
unnamed block $b1496, line 1748 in "tclProc.c"
TclObjInterpProcCore(interp = 0x0000000110067d40, procNameObj = 0x0000000110063c00, skip = 1, errorProc = 0x09001000a0238380), line 1748 in "tclProc.c"
TclObjInterpProc(clientData = 0x0000000110087560, interp = 0x0000000110067d40, objc = 4, objv = 0x000000011006be60), line 1642 in "tclProc.c"
unnamed block $b14, line 3690 in "tclBasic.c"
TclEvalObjvInternal(interp = 0x0000000110067d40, objc = 4, objv = 0x000000011006be60, command = (nil), length = 0, flags = 0), line 3690 in "tclBasic.c"
unnamed block $b16, line 3830 in "tclBasic.c"
TclEvalObjvInternal(interp = 0x0000000110067d40, objc = 3, objv = 0x0000000110096050, command = (nil), length = 0, flags = 131072), line 3830 in "tclBasic.c"
Tcl_EvalObjv(interp = 0x0000000110067d40, objc = 3, objv = 0x0000000110096050, flags = 131072), line 3886 in "tclBasic.c"
unnamed block $b24, line 4983 in "tclBasic.c"
unnamed block $b23, line 4983 in "tclBasic.c"
TclEvalObjEx(interp = 0x0000000110067d40, objPtr = 0x0000000110064350, flags = 131072, invoker = (nil), word = 0), line 4983 in "tclBasic.c"
Tcl_EvalObjEx(interp = 0x0000000110067d40, objPtr = 0x0000000110064350, flags = 131072), line 4903 in "tclBasic.c"
Tcl_RecordAndEvalObj(interp = 0x0000000110067d40, cmdPtr = 0x00000001100642c0, flags = 131072), line 143 in "tclHistory.c"
Tcl_Main(argc = -1, argv = 0x0ffffffffffff368, appInitProc = 0x0000000110000748), line 554 in "tclMain.c"
main(argc = 1, argv = 0x0ffffffffffff360), line 87 in "tclAppInit.c"

if we run Tcl under debugger, stop at 1907 line and print contents of pc variable, then we get "invalid ptr" diagnostics:
(dbx) print pc
(invalid char ptr (0x00000002100cc53e))


note that pc becomes invalid at line 4715:
[28] stopped in unnamed block $b930 at line 4715 in file "tclExecute.c" ($t1)
 4715               NEXT_INST_F((iResult? TclGetInt4AtPtr(pc+1) : 5), 2, 0);
hobbsplain2009-05-25 23:09:06
This is most likely due to a problem in the compiler setup as this combination does work correctly for us.  You need to use xlc_r or cc_r for threaded builds on AIX, and make sure the linker matches.
sf-robotplain2009-06-09 09:20:38
allow_comments - 1

This Tracker item was closed automatically by the system. It was
previously set to a Pending status, and the original submitter
did not respond within 14 days (the time period specified by
the administrator of this Tracker).
Log in (anonymous is fine) to add a comment.