Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: ae10189093881f47ca2b50c9581baffa9c8a9b93
Ticket: 548686ffffffffffffffffffffffffffffffffff
expr || fails with hex data
User & Date: dkf on 2002-04-26 15:15:45
Changes

  1. assignee changed to: "dkf"
  2. icomment:
    Logged In: YES 
    user_id=79902
    
    I can't reproduce using 8.4a5 on Solaris8, but to help I
    attach the bytecode produced (the instruction offsets are a
    little odd because of how I'm doing the instrumentation)
    
      Command 4: "expr {$a||$b}"
        (16) loadScalar1 0  # var "a"
        (18) jumpTrue1 6    # pc 24
        (20) push1 1        # "0"
        (22) jump1 4        # pc 26
        (24) push1 3        # "1"
        (26) dup 
        (27) jumpTrue1 5    # pc 32
        (29) loadScalar1 1  # var "b"
        (31) lor 
        (32) done 
    
    So, what is the problem?  Is the fault coming from
    INST_JUMP_TRUE1 or INST_LOR?  Actually, it doesn't really
    matter; the real problem is indeed Tcl_GetBooleanFromObj()
    (called by both those instructions) being unable to handle
    0x0 on some platforms.
    
    Ah!  Oh.  I see a problem because only strtoll() and
    strtod() are used to try to parse the string, and not
    strtol().  I'll fix this bug (which still exists on the head
    on 64-bit machines!) and backport to the 8.3 branch.
    
    
  3. login: "dkf"
  4. mimetype: "text/plain"
  5. subsystem changed to: "10. Objects"
  6. username: "dkf"