Skip to content
Tcl Source Code History Of Ticket 617689ffff
Login

History Of Ticket 617689ffff

Artifacts Associated With Ticket 617689ffff

  1. Ticket change [5c4ea4dabd] (rid 115278) by rkroll on 2002-10-02 18:36:07:

    1. assignee initialized to: "nobody"
    2. cmimetype initialized to: "text/plain"
    3. comment initialized to:
      
      tclsh fails to load the init.tcl file.  The ::auto_load variable is 
      not set as
      a result of a failure of the program control logic.  This 
      problem is does not
      seem to be related to auto_path or finding the correct 
      installation
      directories.
      
      This bug occures on Sun Sparc.
      
          john@tdc : uname -a
          SunOS tdc 5.8 Generic_108528-15 sun4u sparc 
      SUNW,Sun-Fire-880
      
      This bug occures for a fairly old version of gcc.
      
          john@tdc : gcc -v
          gcc version egcs-2.91.66 19990314 (egcs-1.1.2 release)
      
      This bug does not occure for the Sun compiler
      
          john@tdc : cc -V
          cc: Sun WorkShop 6 update 1 C 5.2 Patch 109513-10 
      2002/04/16
      
      There are no TCL related environment variables set.
      
          john@tdc : printenv | grep -i tcl
          PWD=/home/john/tclsrc
          MMTITCL=/data/mmti/tcl
      
      At the top of init.tcl logic (an if statement) exists to set the 
      default
      value of ::auto_load.  This logic fails and causes tclsh to fail.
      
      Typing some simple commands to evaluate the situation 
      reveals the [if] is
      broken for this case.  The return from [info exists 
      ::auto_path] is not
      properly negated by ! and passed to [if] although simple [if] 
      logic seems ok?
      
      I have left this installation on my disk.  Contact me if you 
      need more info.
      
      
      John Roll
      [email protected]
      
      
          The 8.4.0 distribution was retrieved from sourceforge.
      
          mkdir tclsrc
          cd tclsrc
          gzip -d < ../tcl8.4.0-src.tar.gz | tar xvf -
          cd tcl8.4.0/unix
          ./configure --prefix=/home/john/tclsrc
          make
          make runtest
          LD_LIBRARY_PATH=`pwd`:; export 
      LD_LIBRARY_PATH; \
          TCL_LIBRARY="/home/john/tclsrc/tcl8.4.0/library"; export 
      TCL_LIBRARY; \
          ./tcltest
          application-specific initialization failed: Can't find a usable 
      init.tcl in
      
        ... long stack trace omitted here
      
          This probably means that Tcl wasn't installed properly.
      
          % if { 1 } { puts True }
          True
          % set xx 1
          1
          % if { $xx } { puts True }
          True
          % if { !$xx } { puts True }
          %
          % puts [info exists auto_path]
          0
          % if { ![info exists ::auto_path] } { puts True }
          %
      
      
      
    4. foundin initialized to: "obsolete: 8.4.0"
    5. priority initialized to: "5 Medium"
    6. resolution initialized to: "None"
    7. status initialized to: "Open"
    8. submitter initialized to: "rkroll"
    9. subsystem initialized to: "None"
    10. title initialized to: "tclsh fails to source init.tcl"
    11. type initialized to: "Bug"
  2. Add attachment "stack.dump" [bdc24bc00e] (rid 101959) by rkroll on 2002-10-03 01:36:07.

  3. Ticket change [99de004447] (rid 110862) by rkroll on 2002-10-03 01:36:07:

    1. icomment:
      
      
      File Added - 32253: stack.dump
      
      
      
    2. login: "rkroll"
    3. mimetype: "text/plain"
    4. username: "rkroll"
  4. Ticket change [b1fdc1c7fb] (rid 98260) by dgp on 2002-10-03 07:02:53:

    1. assignee changed to: "dgp"
    2. priority changed to: "3 Low"
    3. subsystem changed to: "17. Commands I-L"
  5. Ticket change [62c8fc193f] (rid 92465) by dgp on 2002-10-03 07:02:54:

    1. icomment:
      Logged In: YES 
      user_id=80530
      
      
      This bizarre situation boils down to "the [if] command
      does not work", apparently attributed to the compiler
      used to build Tcl (?!?!).
      
      Available workaround is to use a different compiler, so
      this is fairly low priority, but it seems bizarre that a
      compiler could break things this way.  Would be nice to
      rule out any fragility in Tcl, and thoroughly blame a
      busted compiler.
      
      
    2. login: "dgp"
    3. mimetype: "text/plain"
    4. username: "dgp"
  6. Ticket change [4e8eda6605] (rid 125665) by dgp on 2002-10-03 07:03:12:

    1. assignee changed to: "dkf"
  7. Ticket change [b4ae1f2f98] (rid 125085) by dgp on 2002-10-03 07:10:49:

    1. title changed to: "egcs-2.91.66 breaks [if]"
  8. Ticket change [52296593e3] (rid 126265) by hobbs on 2002-10-03 07:26:18:

    1. closedate changed to: "2002-10-03T00:26:18"
    2. closer changed to: "hobbs"
    3. icomment:
      Logged In: YES 
      user_id=72656
      
      if changing compilers makes things work, the "broken" 
      compiler should be tested with varying -O options.  egcs is 
      quite old, and that may have had a bug that is exposed.
      
      
    4. login: "hobbs"
    5. mimetype: "text/plain"
    6. resolution changed to: "Invalid"
    7. status changed to: "Pending"
    8. username: "hobbs"
  9. Ticket change [856bfa7d9d] (rid 131309) by dgp on 2002-10-03 11:16:38:

    1. assignee changed to: "dgp"
    2. icomment:
      Logged In: YES 
      user_id=80530
      
      FWIW, I reproduced this.  The [expr] command appears
      to completely ignore the ! operator.
      
      
      
    3. login: "dgp"
    4. mimetype: "text/plain"
    5. status changed to: "Open"
    6. title changed to: "egcs-2.91.66 breaks ! in [expr]"
    7. username: "dgp"
  10. Ticket change [ff15560f2a] (rid 108700) by dgp on 2002-10-03 11:49:37:

    1. assignee changed to: "msofer"
    2. icomment:
      Logged In: YES 
      user_id=80530
      
      
      The compiled form of [expr] is producing
      the error.  It appears that the correct bytecode
      is generated, but the bytecode execution
      engine is not producing the right results:
      
        Compiling: "expr !0"
      
      ByteCode 0xe7d20, refCt 1, epoch 0, interp 0xdd3a8 (epoch 0)
        Source "expr !0\n"
        Cmds 1, src 8, inst 4, litObjs 1, aux 0, stkDepth 1,
      code/src 15.00
        Code 120 = header 100+inst 4+litObj 4+exc 0+aux 0+cmdMap 4
        Commands 1:
            1: pc 0-2, src 0-6
        Command 1: "expr !0"
          (0) push1 0         # "0"
          (2) not 
          (3) done 
      
      Executing ByteCode 0xe7d20, refCt 2, epoch 0, interp 0xdd3a8
      (epoch 0)
        Source: "expr !0\n"
        Cmds 1, src 8, inst 4, litObjs 1, aux 0, stkDepth 1,
      code/src 15.00
        Code 120 = header 100+inst 4+litObj 4+exc 0+aux 0+cmdMap 4
        Starting stack top=-1
      0
      
      
      miguel, where does one look next?
      
      
    3. login: "dgp"
    4. mimetype: "text/plain"
    5. subsystem changed to: "47. Bytecode Compiler"
    6. username: "dgp"
  11. Ticket change [540cf1a351] (rid 93870) by dgp on 2002-10-04 03:50:06:

    1. icomment:
      Logged In: YES 
      user_id=80530
      
      With both tcl_traceCompile and tcl_traceExec set to 3,
      the trace information is better...
      
      ByteCode 0xe76a8, refCt 1, epoch 0, interp 0xdd3b0 (epoch 0)
        Source "expr !0\n"
        Cmds 1, src 8, inst 4, litObjs 1, aux 0, stkDepth 1,
      code/src 15.00
        Code 120 = header 100+inst 4+litObj 4+exc 0+aux 0+cmdMap 4
        Commands 1:
            1: pc 0-2, src 0-6
        Command 1: "expr !0"
          (0) push1 0         # "0"
          (2) not 
          (3) done 
      
      Executing ByteCode 0xe76a8, refCt 2, epoch 0, interp 0xdd3b0
      (epoch 0)
        Source: "expr !0\n"
        Cmds 1, src 8, inst 4, litObjs 1, aux 0, stkDepth 1,
      code/src 15.00
        Code 120 = header 100+inst 4+litObj 4+exc 0+aux 0+cmdMap 4
        Starting stack top=-1
       1: -1 (0) push1 0      # "0"
       1: -1 (0) push1 0 => "0"
       1:  0 (2) not 
       1:  0 (2) not 0 => "0"
       1:  0 (3) done 
       1:  0 (3) done => return code=0, result="0"
      
         ... no enclosing catch, returning TCL_OK
      0
      
      
      
    2. login: "dgp"
    3. mimetype: "text/plain"
    4. username: "dgp"
  12. Ticket change [6208a28659] (rid 92343) by dgp on 2002-10-04 04:47:28:

    1. assignee changed to: "dgp"
    2. closedate changed to: "2002-10-03T21:47:28"
    3. closer changed to: "dgp"
    4. icomment:
      Logged In: YES 
      user_id=80530
      
      egcs-1.1.2 is apparently not able to properly
      compile line 3543 of the file tcl/generic/tclExecute.c.
      
      In particular when (i == 0) and (*pc == INST_LNOT),
      then the value of expression
      
          (*pc == INST_UMINUS)? -i : !i
      
      should be 1, but it is computed to be 0.  Broken compiler.
      Fix is to use a compiler that is not broken.
      
      
      
    5. login: "dgp"
    6. mimetype: "text/plain"
    7. status changed to: "Closed"
    8. username: "dgp"