Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 4a1768d3deef3fb10f69485ff576b82c6f2dbc90949e3ad93de0a56d19f29370
Ticket: 26f1328a86863216c8fae28f55ff0e09135d5d35
sizeof(int) < sizeof(void*) -> Crash
User & Date: anonymous on 2022-01-07 16:13:04
Changes

  1. assignee changed to: "nobody"
  2. closer changed to: "nobody"
  3. cmimetype changed to: "text/plain"
  4. comment changed to:
    I'm having fun trying to port Tcl to Plan 9 at the moment.
    
    One early problem was that Tcl crashed as soon as I was executing
    anything, like "parray env".  Debugging the problem, it turns out that
    there is a problem in the bytecode interpreter.  This is quite similar
    to #2796438 on AIX, it might be the same issue.
    
    The bytecode interpreter uses the macro TclGetInt1AtPtr to read an
    offset from the bytecode.  These offsets can be negative Problem is
    that the result of that macro is an unsigned int, despite the name.
    Adding a huge unsigned number to a pointer instead of a small negative
    signed is of course not healthy unless you can count on wrap-around.
    But on Plan9/amd64, sizeof(int) == 4 and sizeof(void*) == 8.
    
    The attached path fixes this.  Sorry that this patch is made against
    the Git mirror, I hope that is ok.
    
  5. foundin changed to: "8.7a6"
  6. is_private changed to: "0"
  7. login: "anonymous"
  8. priority changed to: "5 Medium"
  9. private_contact changed to: "11198a4027193b80a694e66a04403b2c879b1f6f"
  10. resolution changed to: "None"
  11. severity changed to: "Minor"
  12. status changed to: "Open"
  13. submitter changed to: "anonymous"
  14. subsystem changed to: "53. Configuration and Build Tools"
  15. title changed to: "sizeof(int) < sizeof(void*) -> Crash"
  16. type changed to: "Bug"