Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 840336e0b8b3de1d461858decfbdf26c13ca60ed
Ticket: 1780870fffffffffffffffffffffffffffffffff
tcl segfaults when using intel compiler
User & Date: nobody on 2007-08-24 09:10:50
Changes

  1. assignee changed to: "msofer"
  2. cmimetype changed to: "text/plain"
  3. comment changed to:
    When compiling tcl with the intel compiler (icc 10.0 20070426 - x386, linux) and optimisation enabled, the resulting executable segfaults. The issue is in the file generic/tclCompile.c, function TclFixupForwardJump.
    
    What the compiler apparently does not understand/screws up in optimisation is the loop
    
    for (numBytes = envPtr->codeNext-jumpPc-2, p = jumpPc+2+numBytes-1;
         numBytes > 0;  numBytes--, p--) {
     p[3] = p[0];
    }
    
    Changing p to 'volatile' solves the problem - e.g. changing the line
    
    unsigned char* jumpPc,p;
    
    to
    
    unsigned char* jumpPc;
    volatile unsigned char* p;
    
    It would be great, if the above would not be dismissed as a 'compiler issue'. I think the best solution would be if someone who is familiar with the code could convert the loop into a call to memmove (assuming that call is available on most platforms)?
    
    
  4. foundin changed to: "obsolete: 8.4.15"
  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: "nobody"
  10. subsystem changed to: "47. Bytecode Compiler"
  11. title changed to: "tcl segfaults when using intel compiler"
  12. type changed to: "Bug"