Hi,
I have an expect script that logs into a remote machine using ssh. Upon successful authentication, the remote machine displays a banner that contains the following text: "Copyright © 2001", which appears as "Copyright \357\276\251 2001," in the expect_out buffer and Expect/Tcl crashes when parsing this banner text. The debug of the core file indicate that a SIGSEGV is raised in Tcl_UniCharToUtf() when processing that 'copyright symbol'. If that symbol is removed, then everything works successfully.
Please advice how this can be resolved.
Thanks in advance.
Regards,
Priya.
========================================
Debug of the core file:
For information about new features see `help changes'
To remove this message, put `dbxenv suppress_startup_message 7.5' in your .dbxrc
Reading expect
core file header read successfully
Reading ld.so.1
Reading libtcl8.4.so
Reading libdl.so.1
Reading libsocket.so.1
Reading libnsl.so.1
Reading libm.so.2
Reading libc.so.1
Reading libc_psr.so.1
Reading en_US.ISO8859-1.so.3
program terminated by signal SEGV (no mapping at the fault address)
0xff312234: Tcl_UniCharToUtf+0x0058: stb %o3, [%o1 + 1]
(dbx) where
=>[1] Tcl_UniCharToUtf(0xa9, 0x90000, 0x2, 0xa9, 0x75068, 0xa9), at 0xff312234
[2] expNullStrip(0x6dcb0, 0x60c, 0x75674, 0x0, 0x90000, 0x90000), at 0x23ea4
[3] expRead(0x47be8, 0x50650, 0x1, 0xffbfe8ac, 0x3c, 0xa), at 0x241fc
[4] Exp_ExpectObjCmd(0x41ca0, 0x47be8, 0x6, 0xffbfec6c, 0x0, 0x4), at 0x258a0
[5] TclEvalObjvInternal(0x47be8, 0x6, 0xffbfec6c, 0xff34b8b0, 0x0, 0x5e310), at 0xff2a30bc
[6] Tcl_EvalObjv(0x47be8, 0x6, 0xffbfec6c, 0x0, 0xffbfeacc, 0xffbfe984), at 0xff2a357c
[7] exp_eval_with_one_arg(0x0, 0x47be8, 0x4884c, 0x0, 0x6, 0xffbfec6c), at 0x21a94
[8] Exp_ExpectObjCmd(0x0, 0x47be8, 0x2, 0x4884c, 0x94, 0x3), at 0x25558
[9] TclEvalObjvInternal(0x47be8, 0x2, 0x4884c, 0x0, 0x0, 0x5e310), at 0xff2a30bc
[10] TclExecuteByteCode(0x47be8, 0x1, 0x0, 0x2, 0x4884c, 0x48848), at 0xff2d268c
[11] TclCompEvalObj(0x47be8, 0x4f580, 0x0, 0x0, 0x8f, 0x1), at 0xff2d1cac
[12] TclObjInterpProc(0x0, 0x47be8, 0xffbff1e8, 0xffbff6a0, 0xff33fe60, 0x4fc68), at 0xff30aaac
[13] TclEvalObjvInternal(0x47be8, 0x3, 0xffbff6a0, 0x633fe, 0x1d, 0x5ffc8), at 0xff2a30bc
[14] Tcl_EvalEx(0x47be8, 0x60660, 0xffbff6ac, 0x0, 0x2ad, 0xffbff6a0), at 0xff2a3db0
[15] Tcl_FSEvalFile(0x47be8, 0x4f6b8, 0x1, 0x0, 0x5ee38, 0x4f670), at 0xff2f14ac
[16] Tcl_EvalFile(0x47be8, 0xffbffbb6, 0x4f6b8, 0x10, 0x1, 0x0), at 0xff2f001c
[17] exp_interpret_cmdfilename(0x47be8, 0xffbffbb6, 0xffbffa8c, 0x4, 0x5f520, 0xb), at 0x17228
[18] main(0xb, 0xffbffa8c, 0xffbffabc, 0x3f400, 0x0, 0x47be8), at 0x15990
(dbx) quit
I have an expect script that logs into a remote machine using ssh. Upon successful authentication, the remote machine displays a banner that contains the following text: "Copyright © 2001", which appears as "Copyright \357\276\251 2001," in the expect_out buffer and Expect/Tcl crashes when parsing this banner text. The debug of the core file indicate that a SIGSEGV is raised in Tcl_UniCharToUtf() when processing that 'copyright symbol'. If that symbol is removed, then everything works successfully.
Please advice how this can be resolved.
Thanks in advance.
Regards,
Priya.
========================================
Debug of the core file:
For information about new features see `help changes'
To remove this message, put `dbxenv suppress_startup_message 7.5' in your .dbxrc
Reading expect
core file header read successfully
Reading ld.so.1
Reading libtcl8.4.so
Reading libdl.so.1
Reading libsocket.so.1
Reading libnsl.so.1
Reading libm.so.2
Reading libc.so.1
Reading libc_psr.so.1
Reading en_US.ISO8859-1.so.3
program terminated by signal SEGV (no mapping at the fault address)
0xff312234: Tcl_UniCharToUtf+0x0058: stb %o3, [%o1 + 1]
(dbx) where
=>[1] Tcl_UniCharToUtf(0xa9, 0x90000, 0x2, 0xa9, 0x75068, 0xa9), at 0xff312234
[2] expNullStrip(0x6dcb0, 0x60c, 0x75674, 0x0, 0x90000, 0x90000), at 0x23ea4
[3] expRead(0x47be8, 0x50650, 0x1, 0xffbfe8ac, 0x3c, 0xa), at 0x241fc
[4] Exp_ExpectObjCmd(0x41ca0, 0x47be8, 0x6, 0xffbfec6c, 0x0, 0x4), at 0x258a0
[5] TclEvalObjvInternal(0x47be8, 0x6, 0xffbfec6c, 0xff34b8b0, 0x0, 0x5e310), at 0xff2a30bc
[6] Tcl_EvalObjv(0x47be8, 0x6, 0xffbfec6c, 0x0, 0xffbfeacc, 0xffbfe984), at 0xff2a357c
[7] exp_eval_with_one_arg(0x0, 0x47be8, 0x4884c, 0x0, 0x6, 0xffbfec6c), at 0x21a94
[8] Exp_ExpectObjCmd(0x0, 0x47be8, 0x2, 0x4884c, 0x94, 0x3), at 0x25558
[9] TclEvalObjvInternal(0x47be8, 0x2, 0x4884c, 0x0, 0x0, 0x5e310), at 0xff2a30bc
[10] TclExecuteByteCode(0x47be8, 0x1, 0x0, 0x2, 0x4884c, 0x48848), at 0xff2d268c
[11] TclCompEvalObj(0x47be8, 0x4f580, 0x0, 0x0, 0x8f, 0x1), at 0xff2d1cac
[12] TclObjInterpProc(0x0, 0x47be8, 0xffbff1e8, 0xffbff6a0, 0xff33fe60, 0x4fc68), at 0xff30aaac
[13] TclEvalObjvInternal(0x47be8, 0x3, 0xffbff6a0, 0x633fe, 0x1d, 0x5ffc8), at 0xff2a30bc
[14] Tcl_EvalEx(0x47be8, 0x60660, 0xffbff6ac, 0x0, 0x2ad, 0xffbff6a0), at 0xff2a3db0
[15] Tcl_FSEvalFile(0x47be8, 0x4f6b8, 0x1, 0x0, 0x5ee38, 0x4f670), at 0xff2f14ac
[16] Tcl_EvalFile(0x47be8, 0xffbffbb6, 0x4f6b8, 0x10, 0x1, 0x0), at 0xff2f001c
[17] exp_interpret_cmdfilename(0x47be8, 0xffbffbb6, 0xffbffa8c, 0x4, 0x5f520, 0xb), at 0x17228
[18] main(0xb, 0xffbffa8c, 0xffbffabc, 0x3f400, 0x0, 0x47be8), at 0x15990
(dbx) quit