Bug 214205 - lang/tcl86: segfault on startup on arm64
Summary: lang/tcl86: segfault on startup on arm64
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: arm64 Any
: --- Affects Only Me
Assignee: Pietro Cerutti
URL:
Keywords:
: 213861 (view as bug list)
Depends on:
Blocks: 213861
  Show dependency treegraph
 
Reported: 2016-11-04 10:57 UTC by Pietro Cerutti
Modified: 2016-11-10 08:30 UTC (History)
2 users (show)

See Also:
bugzilla: maintainer-feedback? (tcltk)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Pietro Cerutti freebsd_committer freebsd_triage 2016-11-04 10:57:50 UTC
tclsh8.6 segfaults on startup on arm64.
Comment 1 Pietro Cerutti freebsd_committer freebsd_triage 2016-11-04 11:08:44 UTC
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
Comment 2 Pietro Cerutti freebsd_committer freebsd_triage 2016-11-04 11:10:29 UTC
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
Comment 3 Pietro Cerutti freebsd_committer freebsd_triage 2016-11-04 11:22:17 UTC
* 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 */
Comment 4 Pietro Cerutti freebsd_committer freebsd_triage 2016-11-04 13:55:59 UTC
Bug report has been reported to Tcl
http://core.tcl.tk/tcl/tktview/824752f10e0cd14625d2d476ee1ebbf8e7f5fd5c
Comment 6 commit-hook freebsd_committer freebsd_triage 2016-11-04 15:08:52 UTC
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
Comment 7 commit-hook freebsd_committer freebsd_triage 2016-11-04 15:15:57 UTC
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
Comment 8 Ed Maste freebsd_committer freebsd_triage 2016-11-04 15:49:17 UTC
*** Bug 213861 has been marked as a duplicate of this bug. ***
Comment 9 commit-hook freebsd_committer freebsd_triage 2016-11-10 08:30:51 UTC
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