Skip to content
Tcl Source Code History Of Ticket 3129448
Login

History Of Ticket 3129448

Artifacts Associated With Ticket 3129448

  1. Ticket change [8ef3114b57] (rid 120207) by nijtmans on 2010-12-06 08:44:52:

    1. assignee initialized to: "hobbs"
    2. cmimetype initialized to: "text/plain"
    3. comment initialized to:
      Inspired by bug #3127687, noted that on 64-bit
      platforms, where sizeof(integer) == 8, some structures
      are over-allocated because sizeof() might count
      additional padding bytes. That's no big deal, except
      that it is strange anyway to use [4] as the number
      of bytes in the structure.
      
      Solution: use the TclOffset macro to calculate the
      right size, in stead of substracting two sizeof()'s. That
      will correctly take padding bytes into account.
      
      patch attached
      
    4. foundin initialized to: "obsolete: 8.6b1.1"
    5. is_private initialized to: "0"
    6. priority initialized to: "5 Medium"
    7. resolution initialized to: "None"
    8. status initialized to: "Open"
    9. submitter initialized to: "nijtmans"
    10. subsystem initialized to: "41. Memory Allocation"
    11. title initialized to: "possible over-allocation on 64-bit platforms"
    12. type initialized to: "Bug"
  2. Ticket change [74d0d1fb27] (rid 105278) by nijtmans on 2010-12-06 15:45:26:

    1. assignee changed to: "nijtmans"
  3. Add attachment "3129448.patch" [4b3c9ac2e6] (rid 126665) by nijtmans on 2010-12-06 15:46:40.

  4. Ticket change [0f24ce7e18] (rid 94743) by nijtmans on 2010-12-06 15:46:41:

    1. icomment:
      
      
      File Added - 395354: 3129448.patch
      
      
      
    2. login: "nijtmans"
    3. mimetype: "text/plain"
    4. username: "nijtmans"
  5. Ticket change [931f755607] (rid 105762) by nijtmans on 2010-12-06 16:02:31:

    1. closedate changed to: "2010-12-06T09:02:31"
    2. closer changed to: "nijtmans"
    3. icomment:
      
      
      allow_comments - 1
      
      Fixed in HEAD
      
      don't bother for Tcl 8.5 and lower
      
      
    4. login: "nijtmans"
    5. mimetype: "text/plain"
    6. resolution changed to: "Fixed"
    7. status changed to: "Closed"
    8. username: "nijtmans"
  6. Ticket change [22b33f2ebf] (rid 130799) by dgp on 2010-12-06 21:49:51:

    1. icomment:
      
      what does "integer" mean in this report?  int ? long int ?
      
      
    2. login: "dgp"
    3. mimetype: "text/plain"
    4. username: "dgp"
  7. Ticket change [d2890a1eef] (rid 113544) by dgp on 2010-12-06 21:54:28:

    1. icomment:
      Hmmm... the actual patch applies doesn't
      appear to have anything to do with integers,
      but with pointer sizes and alignment matters.
      
      Is there a platform on which the effectiveness
      of the patch is actually tested?
      
      
    2. login: "dgp"
    3. mimetype: "text/plain"
    4. username: "dgp"
  8. Ticket change [43326406b2] (rid 116510) by nijtmans on 2010-12-06 23:12:12:

    1. icomment:
      Here is a small test program (try it on any UNIX machine) which shows the
      dirrerence between substracting two sizes or determining the offset.
      
      This program prints:
          12 8
      
      Here I used a long long as data type in stead of an int. It will occur
      on any machine where sizeof(int) = 8.
      
      =====================================================
      #include <stdio.h>
      #define TclOffset(type, field) \
      ((int) ((char *) &((type *) 0)->field))
      typedef struct {
      long long dummy;
      char buf[4];
      } mytype;
      void main() {
      mytype x;
      int answer1 = sizeof(x) - sizeof(x.buf);
      int answer2 = (unsigned)TclOffset(mytype, buf);
      printf("%d %d\n", answer1, answer2);
      }
      
      
      
    2. login: "nijtmans"
    3. mimetype: "text/plain"
    4. username: "nijtmans"
  9. Ticket change [0f1567927d] (rid 94731) by nijtmans on 2010-12-11 04:55:55:

    1. icomment:
      Part 2, a few more places where the same pattern was used. Patch attached.
      
      
    2. login: "nijtmans"
    3. mimetype: "text/plain"
    4. username: "nijtmans"
  10. Add attachment "3129448_2.patch" [fda86e9eb3] (rid 108443) by nijtmans on 2010-12-11 04:56:25.

  11. Ticket change [212d4305c2] (rid 130540) by nijtmans on 2010-12-11 04:56:25:

    1. icomment:
      
      
      File Added - 395809: 3129448_2.patch
      
      
      
    2. login: "nijtmans"
    3. mimetype: "text/plain"
    4. username: "nijtmans"
  12. Ticket change [f297ba27d4] (rid 109578) by nijtmans on 2011-01-25 22:57:50:

    1. icomment:
      backported strcpy->memcpy changes to 8.5 and 8.4 as well, not any other struct change
      
      
    2. login: "nijtmans"
    3. mimetype: "text/plain"
    4. username: "nijtmans"