tclsh8.6 segfaults on startup on arm64.
Core file '/home/gahr/tcl/unix/../../tclsh.core' (aarch64) was loaded. (lldb) bt * thread #1: tid = 101137, 0x0000000040547678 libtcl8.7.so`Tcl_SetObjResult + 12, name = 'tclsh', stop reason = signal SIGSEGV * frame #0: 0x0000000040547678 libtcl8.7.so`Tcl_SetObjResult + 12 frame #1: 0x000000004052ce1c libtcl8.7.so`Tcl_ListObjReplace + 252 frame #2: 0x00000000404f8520 libtcl8.7.so`TclCompileEnsemble + 1312 frame #3: 0x00000000404f93c0 libtcl8.7.so`TclAttemptCompileProc + 212 frame #4: 0x00000000404e20ec libtcl8.7.so`TclCompileScript + 1588 frame #5: 0x00000000404e155c libtcl8.7.so`TclSetByteCodeFromAny + 164 frame #6: 0x00000000404fcb30 libtcl8.7.so`TclCompileObj + 500 frame #7: 0x000000004047e7f4 libtcl8.7.so`TclNREvalObjEx + 476 frame #8: 0x0000000040529e84 libtcl8.7.so`TclNREvalFile + 896 frame #9: 0x0000000040492a14 libtcl8.7.so`TclNRSourceObjCmd + 188 frame #10: 0x000000004047c75c libtcl8.7.so`Tcl_EvalObjv + 104 frame #11: 0x000000004047db90 libtcl8.7.so`TclEvalEx + 2032 frame #12: 0x00000000004009b4 tclsh`Tcl_AppInit + 20 frame #13: 0x0000000040530540 libtcl8.7.so`Tcl_MainEx + 440 frame #14: 0x0000000000400990 tclsh`main + 48 frame #15: 0x00000000004008c0 tclsh`__start + 360 frame #16: 0x0000000040412658 ld-elf.so.1 at rtld_start.S:41
frame #0: 0x0000000040547678 libtcl8.7.so`Tcl_SetObjResult + 12 libtcl8.7.so`Tcl_SetObjResult: -> 0x40547678 <+12>: ldr x20, [x19, #680] 0x4054767c <+16>: str x1, [x19, #680] 0x40547680 <+20>: ldr w8, [x1] 0x40547684 <+24>: add x29, sp, #16 ; =16
* thread #1: tid = 101151, 0x0000000040547fa4 libtcl8.7.so`Tcl_SetObjResult(interp=0x0000000000000000, objPtr=0x0000000040cd2610) + 16 at tclResult.c:527, stop reason = signal SIGSEGV: invalid address (fault address: 0x2a8) frame #0: 0x0000000040547fa4 libtcl8.7.so`Tcl_SetObjResult(interp=0x0000000000000000, objPtr=0x0000000040cd2610) + 16 at tclResult.c:527 [opt] 524 * result is made an empty string object. */ 525 { 526 register Interp *iPtr = (Interp *) interp; -> 527 register Tcl_Obj *oldObjResult = iPtr->objResultPtr; 528 529 iPtr->objResultPtr = objPtr; 530 Tcl_IncrRefCount(objPtr); /* since interp result is a reference */
Bug report has been reported to Tcl http://core.tcl.tk/tcl/tktview/824752f10e0cd14625d2d476ee1ebbf8e7f5fd5c
Fix committed in Tcl source code: http://core.tcl.tk/tcl/info/16efbc4dbf572ac1 http://core.tcl.tk/tcl/info/cf3aa0440e048aa3 http://core.tcl.tk/tcl/info/24d90770030948ca
A commit references this bug: Author: gahr Date: Fri Nov 4 15:08:17 UTC 2016 New revision: 425329 URL: https://svnweb.freebsd.org/changeset/ports/425329 Log: lang/tcl86: fix integer overflow check and avoid segfault PR: 214205 Submitted by: gahr Changes: head/lang/tcl86/Makefile head/lang/tcl86/files/patch-bug214205
A commit references this bug: Author: gahr Date: Fri Nov 4 15:15:36 UTC 2016 New revision: 425331 URL: https://svnweb.freebsd.org/changeset/ports/425331 Log: lang/tcl85: fix integer overflow and avoid segfault PR: 214205 Submitted by: gahr Changes: head/lang/tcl85/Makefile head/lang/tcl85/files/patch-bug214205
*** Bug 213861 has been marked as a duplicate of this bug. ***
A commit references this bug: Author: koobs Date: Thu Nov 10 08:30:46 UTC 2016 New revision: 425834 URL: https://svnweb.freebsd.org/changeset/ports/425834 Log: MFH: r425331 - lang/tcl85: fix integer overflow and avoid segfault PR: 214205 Submitted by: gahr Approved by: ports-secteam (blanket) Changes: _U branches/2016Q4/ branches/2016Q4/lang/tcl85/Makefile branches/2016Q4/lang/tcl85/files/patch-bug214205