Skip to content
Tcl Source Code Artifact [beeb903202]
Login

Artifact [beeb903202]

Artifact beeb903202d2ac673dd11f3635d398c70666e40f:

Wiki page [Object System and Fundamental Object Types] by dgp on 2014-09-10 22:33:14.
D 2014-09-10T22:33:14.078
L Object\sSystem\sand\sFundamental\sObject\sTypes
P 4cf9d794b061fd6aa70f63cb4effeb4b1e8ce906
U dgp
W 679
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 System]
  *  [string Object Type]
  *  [end-offset 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 27ffd31577f029263ed2a757c82ae255