Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 66d2dbd9494dba3b494dd23375644d681e8a57c1
Ticket: 542588ffffffffffffffffffffffffffffffffff
bug in expr error handler
User & Date: msofer on 2002-04-18 04:12:31
Changes

  1. icomment:
    Logged In: YES 
    user_id=148712
    
    No, it never gets to 'abs'; note that it is '-' complaining
    about a non valid operand. Doubles are acceptable operands
    for 'abs'.
    
    Look at what is happening in INST_SUB: TclLooksLikeInt
    returns 1, so GetIntFromObj is called and it fails, so that
    IllegalExprOperandType gets called. GetDoubleFromObj is
    never called (it is called only when TclLooksLikeInt fails). 
    
    The problem is indeed that IllegalExprOperandType is not
    expecting to receive "too large integers". The local fix
    there will produce something like
    
    % expr { abs($end - $begin) }
    can't use integer value too large to represent as operand of
    "-" 
    
    The case
    
    % expr abs($end - $begin)
    integer value too large to represent 
    
    is caught earlier, before subtraction is ever attempted.
    
    
  2. login: "msofer"
  3. mimetype: "text/plain"
  4. username: "msofer"