Skip to content
Tcl Source Code Artifact [c085fcae4d]
Login

Artifact [c085fcae4d]

Artifact c085fcae4dc3c841fb376edc2d40cab7647fb590:

Wiki page [Object System and Fundamental Object Types] by dgp on 2014-09-08 14:02:31.
D 2014-09-08T14:02:31.519
L Object\sSystem\sand\sFundamental\sObject\sTypes
P cd8c796177fc5c9f84ff36d5f43389aa2913c063
U dgp
W 643

This is a huge module containing the fundamental base code that
represents and manipulates values in Tcl, as well as many foundations
that rests on, as well as several of the built-in Tcl_ObjTypes.

For analysis, it helps to break it down futher.

  *  [Encoding]
  *  [Hash Tables]
  *  [Tcl_Obj]
  *  [string Object Type]

Critical defect here: much of the API uses a <i>signed int</i> for object lengths (with negative numbers, typically -1, indicating “use strlen() to get the real length”). This is fine on 32-bit platforms, but massively wrong on 64-bit (except for ILP64 architectures, but that's a rare configuration).
Z 5fe5f7eca1d101ab8bc7d6589e6081bb