Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 63b08cb8da7c3e58dff08ece604a5079f704696f
Ticket: 1602838fffffffffffffffffffffffffffffffff
Late crash with --{exec}-prefix=~/...
User & Date: jcw on 2006-11-25 21:36:22
Changes

  1. assignee changed to: "nobody"
  2. cmimetype changed to: "text/plain"
  3. comment changed to:
    When called with non-absolute paths of the form "~/...", a Tcl build produces a tclsh binary and installs it.
    
    However, the resulting exe (Mac OS X 10.4.8, Intel) crashes:
    
    $ w/tclg/bin/tclsh8.4 
    Bus error
    
    The commands I used for the build were:
    
    rm -rf /tmp/tclg
    mkdir -p /tmp/tclg
    cd /tmp/tclg
    /Users/Shared/Oss/tcl84-cvs/unix/configure --enable-symbols \
          --disable-shared --prefix=~/w/tclg --exec-prefix=~/w/tclg
    make install
    
    When I use this configure instead, the resulting tclsh is fine:
    
    /Users/Shared/Oss/tcl84-cvs/unix/configure --enable-symbols \
          --disable-shared --prefix=~/w/tclg --exec-prefix=~/w/tclg
    
    Here's the stack trace:
    
    $ gdb w/tclg/bin/tclsh8.4
    GNU gdb 6.3.50-20050815 (Apple version gdb-573) (Fri Oct 20 15:50:43 GMT 2006)
    Copyright 2004 Free Software Foundation, Inc.
    GDB is free software, covered by the GNU General Public License, and you are
    welcome to change it and/or distribute copies of it under certain conditions.
    Type "show copying" to see the conditions.
    There is absolutely no warranty for GDB.  Type "show warranty" for details.
    This GDB was configured as "i386-apple-darwin"...Reading symbols for shared libraries ... done
    
    (gdb) r
    Starting program: /Users/jcw/w/tclg/bin/tclsh8.4 
    Reading symbols for shared libraries ...... done
    
    Program received signal EXC_BAD_ACCESS, Could not access memory.
    Reason: KERN_PROTECTION_FAILURE at address: 0x00000000
    0x0001a0c2 in TclpFindVariable (name=0xada10 "HOME", lengthPtr=0xbfffedd4) at /Users/Shared/Oss/tcl84-cvs/unix/tclUnixInit.c:970
    970         for (i = 0, env = environ[i]; env != NULL; i++, env = environ[i]) {
    (gdb) p i
    $1 = 0
    (gdb) p environ
    $2 = <unknown type>
    (gdb) p env
    $3 = 0x0
    (gdb) bt 9
    #0  0x0001a0c2 in TclpFindVariable (name=0xada10 "HOME", lengthPtr=0xbfffedd4) at /Users/Shared/Oss/tcl84-cvs/unix/tclUnixInit.c:970
    #1  0x0004c920 in TclGetEnv (name=0xada10 "HOME", valuePtr=0xbfffee24) at /Users/Shared/Oss/tcl84-cvs/unix/../generic/tclEnv.c:503
    #2  0x00076fd2 in SetFsPathFromAny (interp=0x0, objPtr=0x1801e28) at /Users/Shared/Oss/tcl84-cvs/unix/../generic/tclIOUtil.c:6111
    #3  0x000038fb in Tcl_ConvertToType (interp=0x0, objPtr=0x1801e28, typePtr=0xba178) at /Users/Shared/Oss/tcl84-cvs/unix/../generic/tclObj.c:471
    #4  0x00075cba in Tcl_FSConvertToPathType (interp=0x0, objPtr=0x1801e28) at /Users/Shared/Oss/tcl84-cvs/unix/../generic/tclIOUtil.c:5019
    #5  0x000764ba in Tcl_FSGetNormalizedPath (interp=0x0, pathObjPtr=0x1801e28) at /Users/Shared/Oss/tcl84-cvs/unix/../generic/tclIOUtil.c:5512
    #6  0x0007352e in Tcl_FSOpenFileChannel (interp=0x0, pathPtr=0x1801e28, modeString=0xaa88c "r", permissions=0) at /Users/Shared/Oss/tcl84-cvs/unix/../generic/tclIOUtil.c:2153
    #7  0x0004a15e in OpenEncodingFile (dir=0x601310 "~/w/tclg/lib/tcl8.4", name=0xbffff460 "us-ascii") at /Users/Shared/Oss/tcl84-cvs/unix/../generic/tclEncoding.c:1411
    #8  0x00049e7c in LoadEncodingFile (interp=0x0, name=0xbffff460 "us-ascii") at /Users/Shared/Oss/tcl84-cvs/unix/../generic/tclEncoding.c:1310
    (More stack frames follow...)
    
    If the build is so sensitive to paths, shouldn't it fail i.s.o. installing the resulting binary?
    
    -jcw
    
  4. foundin changed to: "None"
  5. is_private changed to: "0"
  6. priority changed to: "5 Medium"
  7. resolution changed to: "None"
  8. status changed to: "Open"
  9. submitter changed to: "jcw"
  10. subsystem changed to: "53. Configuration and Build Tools"
  11. title changed to: "Late crash with --{exec}-prefix=~/..."
  12. type changed to: "Bug"