Skip to content
Tcl Source Code History Of Ticket 443938ffffffffffffffffffffffffffffffffff
Login

History Of Ticket 443938ffffffffffffffffffffffffffffffffff

Artifacts Associated With Ticket 443938ffffffffffffffffffffffffffffffffff

  1. Ticket change [a31a6b7b9e] (rid 110002) by nobody on 2001-07-23 22:34:35:

    1. assignee initialized to: "nobody"
    2. cmimetype initialized to: "text/plain"
    3. comment initialized to:
      The malloc/ckalloc routines such as tcl_Allooc are defined with the size variable explicitly set to 
      "unsigned int".  They should be set to "size_t" (typdef in stdlib.h).  When built on a 64 bit platform 
      such as DEC TRU-64 or Solaris 8 (64 bit mode), this definition causes the programs to build 
      improperly. There were also usages of strncmp and sizeof that were coded as if they were 
      expected to return "unsigne int" instead of "size_t" (unsigned long).
      
      Compiled with gcc 3.0 as well as Solaris 8 Workshop 6.0 cc and DEC V5.1 cc
      
      
      
    4. foundin initialized to: "obsolete: 8.3.3"
    5. priority initialized to: "5 Medium"
    6. resolution initialized to: "None"
    7. status initialized to: "Open"
    8. submitter initialized to: "nobody"
    9. subsystem initialized to: "07. Variables"
    10. title initialized to: "malloc routines use wrong cast"
    11. type initialized to: "Bug"
  2. Ticket change [497c4b71bd] (rid 100060) by dgp on 2001-07-25 05:47:44:

    1. subsystem changed to: "41. Memory Allocation"
  3. Ticket change [f81a0efa78] (rid 91482) by hobbs on 2001-08-07 06:40:26:

    1. closedate changed to: "2001-08-06T23:40:26"
    2. closer changed to: "hobbs"
    3. icomment:
      Logged In: YES 
      user_id=72656
      
      Unfortunately you can't change those procedures because 
      changing size decls would cause binary incompatability in 
      the stubs mechanism.  That they are declared as uints might 
      not be optimal, but it is perfectly OK.
      
      
    4. login: "hobbs"
    5. mimetype: "text/plain"
    6. resolution changed to: "Invalid"
    7. status changed to: "Closed"
    8. username: "hobbs"
  4. Ticket change [0fc6b79ab9] (rid 94849) by sabbahillel on 2001-08-07 20:32:32:

    1. icomment:
      Logged In: YES 
      user_id=286923
      
      The point is that when compiled in 64 bit mode, uint is actually fatal.  In order to prevent errors, these 
      "unsigned int" declarations must be changed to "unsigned long".  When compiled in 32 bit mode, uint an 
      ulong are the same.  However, when compiled in DEC TRU64, or on Solaris 7 or 8 (gcc -m64), there is abinary 
      incompatibility and it is a fatal compilation error not to use unsigned long.
      
      -- 
      Said the fox to the fish, "Join me ashore".
      The fish are the Jews, Torah is our water.
      
      Hillel (Sabba) Markowitz
      [email protected], [email protected]
      
      
      
    2. login: "sabbahillel"
    3. mimetype: "text/plain"
    4. username: "sabbahillel"
  5. Ticket change [94ce9327f0] (rid 106060) by hobbs on 2001-08-08 00:15:48:

    1. assignee changed to: "hobbs"
    2. icomment:
      Logged In: YES 
      user_id=72656
      
      I'm still inclined to call this invalid, because I have 
      compiled Tcl countless times on Solaris64 in 64-bit mode 
      without fatal compilation errors (and it works), as well as 
      Tru64.  I'll look into it though (and make sure gcc isn't 
      blowing smoke where the native compilers are OK).
      
      
    3. login: "hobbs"
    4. mimetype: "text/plain"
    5. status changed to: "Open"
    6. username: "hobbs"
  6. Ticket change [18d2bfd015] (rid 122728) by sabbahillel on 2001-08-08 03:17:12:

    1. icomment:
      Logged In: YES 
      user_id=286923
      
      The main problem seems to be that the size_t variables are declared as "(unsigned)" which defaults to 
      "unsigned int". gcc points out that the parameters are a different width when long and int are different (in 
      64 bit mode). Even if it happens to work out, it should still be cased explicitly as (unsigned long) just to be 
      certain. When compiled in 32 bit mode, it won't make a difference (since long = int) but it will make certain 
      that 64 bit does not go bad.
      
      Even if it were not fatal, it would be better to do it correctly as the actual data passed through gets 
      corrupted.
      
      
      
    2. login: "sabbahillel"
    3. mimetype: "text/plain"
    4. username: "sabbahillel"
  7. Ticket change [80cec71a6d] (rid 116936) by davygrvy on 2001-11-13 14:48:29:

    1. icomment:
      Logged In: YES 
      user_id=7549
      
      I agree with sabbahillel.
      
      If we let the native size of "The maximum number of bytes to 
      which a pointer can refer" that size_t is (at least in ISO
      C), and express it to the outside, porting to 64 shouldn't
      be this hard as it is.
      
      Jeff, you refer to binary compatibility, but what is int???
      Would that be the same as long, or __int32?  Same problem for WIN64, too.
      
      
    2. login: "davygrvy"
    3. mimetype: "text/plain"
    4. username: "davygrvy"
  8. Ticket change [c0a1f72a1b] (rid 102442) by hobbs on 2001-11-14 00:55:10:

    1. icomment:
      Logged In: YES 
      user_id=72656
      
      int is 4 bytes on most systems, whereas size_t is 8.  This 
      will break binary compatability with all stubs-based 
      extensions.  IOW, no can do in 8.x.
      
      
    2. login: "hobbs"
    3. mimetype: "text/plain"
    4. priority changed to: "4"
    5. username: "hobbs"
  9. Ticket change [005e8e4927] (rid 119310) by sabbahillel on 2001-11-14 04:52:55:

    1. icomment:
      Logged In: YES 
      user_id=286923
      
      Then at the very least the "(unsigned) ckalloc" references should be changed to "(unsigned long) ckalloc"
      
      I went through the code by hand and the changes do appear to work correctly.
      
      [email protected] or [email protected]
      
      
      
    2. login: "sabbahillel"
    3. mimetype: "text/plain"
    4. username: "sabbahillel"
  10. Ticket change [bc5db33c18] (rid 101736) by dkf on 2001-11-14 16:35:16:

    1. icomment:
      Logged In: YES 
      user_id=79902
      
      It is possible to upgrade the stub table so that new
      compilations use the new-type API but existing extensions
      use the old-type API (this is one of the things that Stubs
      gives us that no ordinary link mechanism can) but it is
      quite a bit of work.
      
      
    2. login: "dkf"
    3. mimetype: "text/plain"
    4. username: "dkf"
  11. Ticket change [d559f867e5] (rid 123608) by hobbs on 2002-02-26 05:11:55:

    1. assignee changed to: "dkf"
    2. icomment:
      Logged In: YES 
      user_id=72656
      
      It has to be noted that ckalloc != malloc, so sticking with 
      unsigned int is OK.  You can't just always cast to long and 
      think you are going to be able to alloc > 4GB of data on 
      LP64 machines.  This looks like something that may fall 
      into the TIP 72 64-bit updates.
      
      
    3. login: "hobbs"
    4. mimetype: "text/plain"
    5. username: "hobbs"
  12. Ticket change [d35289bb8e] (rid 123274) by dkf on 2002-02-26 22:58:37:

    1. icomment:
      Logged In: YES 
      user_id=79902
      
      Not really; TIP#72 only really covers changes to get 64bits
      on 32bit machines. I'll have a look at fixing up *alloc
      sometime though.
      
      
    2. login: "dkf"
    3. mimetype: "text/plain"
    4. username: "dkf"
  13. Ticket change [360e8e5995] (rid 107054) by dkf on 2002-04-25 19:18:37:

    1. icomment:
      Logged In: YES 
      user_id=79902
      
      See also Bug #219196
      
      
    2. login: "dkf"
    3. mimetype: "text/plain"
    4. username: "dkf"
  14. Ticket change [f8479d0274] (rid 91513) by dkf on 2002-11-15 23:23:19:

    1. closedate changed to: "2002-11-15T16:23:19"
    2. closer changed to: "dkf"
    3. icomment:
      Logged In: YES 
      user_id=79902
      
      Addressed as part of TIP #115 - closing this bug because the 
      fix will be driven from a different direction.
      
      
    4. login: "dkf"
    5. mimetype: "text/plain"
    6. resolution changed to: "Later"
    7. status changed to: "Closed"
    8. username: "dkf"