Skip to content
Tcl Source Code History Of Ticket 1030548
Login

History Of Ticket 1030548

Artifacts Associated With Ticket 1030548

  1. Ticket change [113b86469e] (rid 95106) by mistachkin on 2004-09-19 03:30:05:

    1. assignee initialized to: "nobody"
    2. cmimetype initialized to: "text/plain"
    3. comment initialized to:
      
      tclThreadAlloc.c
      ..\generic\tclThreadAlloc.c(974) : error C2220: warning
      treated as error - no object file generated
      ..\generic\tclThreadAlloc.c(974) : warning C4013:
      'TclpFreeAllocMutex' undefined; assuming extern
      returning int
      NMAKE : fatal error U1077: 'cl' : return code '0x2'
      Stop.
      
      The problem has to do with the re-organization of the
      threaded memory allocator related defines a while back.
      
      When compiling with debugging, the TclpFreeAllocMutex
      does not get declared in tclInt.h (and some other
      functions as well).
      
      
    4. foundin initialized to: "obsolete: 8.4.7"
    5. priority initialized to: "9 Immediate"
    6. resolution initialized to: "None"
    7. status initialized to: "Open"
    8. submitter initialized to: "mistachkin"
    9. subsystem initialized to: "None"
    10. title initialized to: "Tcl 8.4 fails to build in debug/threaded config"
    11. type initialized to: "RFE"
  2. Ticket change [15bccb02b5] (rid 124620) by davygrvy on 2004-10-27 01:13:43:

    1. assignee changed to: "vasiljevic"
    2. subsystem changed to: "41. Memory Allocation"
  3. Ticket change [610436ae71] (rid 92169) by andreas_kupries on 2004-10-27 02:34:50:

    1. icomment:
      Logged In: YES 
      user_id=75003
      
      Kevin created a patch for this, and I fixed the patch. Here
      is the combined diff.
      
      
      
      
    2. login: "andreas_kupries"
    3. mimetype: "text/plain"
    4. username: "andreas_kupries"
  4. Add attachment "diff" [f62b42b501] (rid 130243) by andreas_kupries on 2004-10-27 02:34:50.

  5. Ticket change [77132160be] (rid 105701) by andreas_kupries on 2004-10-27 02:34:51:

    1. icomment:
      
      
      File Added - 106579: diff
      
      
      
    2. login: "andreas_kupries"
    3. mimetype: "text/plain"
    4. username: "andreas_kupries"
  6. Ticket change [eaedfe5506] (rid 103449) by andreas_kupries on 2004-10-29 04:14:26:

    1. closedate changed to: "2004-10-28T21:14:26"
    2. closer changed to: "andreas_kupries"
    3. icomment:
      Logged In: YES 
      user_id=75003
      
      Got ok by Don. Committed to 8.4 head.
      
      
      
    4. login: "andreas_kupries"
    5. mimetype: "text/plain"
    6. resolution changed to: "Fixed"
    7. status changed to: "Closed"
    8. username: "andreas_kupries"
  7. Ticket change [a710d79499] (rid 98721) by dossy on 2004-11-24 04:38:03:

    1. icomment:
      Logged In: YES 
      user_id=21885
      
      This "fix" that went into 8.4.8 breaks a portion of our
      Tcl/AOLserver  build at AOL.
      
      I think this change needs to be backed out, and the build
      for Win32  needs to be corrected.
      
      At AOL, we have four different builds: (1) a threaded build
      with the zippy allocator; (2) a threaded build without the
      zippy allocator; (3) a threaded build with the zippy
      allocator and TCL_MEM_DEBUG on; and (4) a threaded build
      without the zippy allocator but with TCL_MEM_DEBUG on.
      
      We build these four configurations on Linux and Solaris but
      not Win32.
      
      I suspect that the change in ifdef's has probably broken our
      builds in other configurations, but configs #3 and #4 above
      completely fail to build now.  (Tcl builds, but AOLserver
      doesn't.)
      
      Can we revisit this change and discuss backing out the
      change and correcting the Win32 build so that it's in line
      with the other platform builds?
      
      
      
    2. login: "dossy"
    3. mimetype: "text/plain"
    4. username: "dossy"
  8. Ticket change [9b8cc2337f] (rid 111146) by hobbs on 2004-11-24 04:56:38:

    1. assignee changed to: "andreas_kupries"
    2. foundin changed to: "obsolete: 8.4.8"
    3. status changed to: "Open"
  9. Ticket change [5b6621df45] (rid 118312) by dkf on 2004-12-02 05:22:40:

    1. icomment:
      Logged In: YES 
      user_id=79902
      
      What is the aspect of aolserver that fails to build when
      threads+TCL_MEM_DEBUG are enabled? I can *almost* but not
      quite grasp what's going on... ;^)
      
      
    2. login: "dkf"
    3. mimetype: "text/plain"
    4. username: "dkf"
  10. Ticket change [19e2acb6b0] (rid 122874) by hobbs on 2004-12-03 03:03:45:

    1. assignee changed to: "hobbs"
    2. closedate changed to: "2004-12-02T20:03:45"
    3. closer changed to: "hobbs"
    4. icomment:
      Logged In: YES 
      user_id=72656
      
      I believe this issue is correctly fixed, and the Dossy's
      configuration was never a valid product of the Tcl
      'configure' script.
      
      
    5. login: "hobbs"
    6. mimetype: "text/plain"
    7. priority changed to: "8"
    8. status changed to: "Pending"
    9. username: "hobbs"
  11. Ticket change [2a0aabfe8a] (rid 118488) by dossy on 2004-12-05 08:06:33:

    1. icomment:
      Logged In: YES 
      user_id=21885
      
      I agree with you, Jeff, since the special AOLserver builds
      actually use sed scripts to change Tcl after Tcl's
      "configure" script has been run.
      
      The error in the AOLserver build that I get now when in the
      --enable-symbols=mem Tcl configuration is:
      
      nsthreadtest.o: In function `DumperThread':
      /cm/build/public/aolserver_v40_r9_test/aolserver/aolserver/nsthread/nsthreadtes
      t.c:336: undefined reference to `Tcl_GetMemoryInfo'
      
      The addition of "!defined(TCL_MEM_DEBUG)" to the top of
      generic/tclThreadAlloc.c in the fix to bug 1030548 means
      that Tcl_GetMemoryInfo() which is defined in the file won't
      get compiled.
      
      Since it seems that defining TCL_THREADS and
      USE_THREAD_ALLOC is mutually exclusive to TCL_MEM_DEBUG,
      then perhaps the fix to this bug is correct, and AOLserver
      needs to be modified.  However, the change introduced by
      this fix does break backward compatibility at least for one
      application (grin) -- perhaps a Tcl_GetMemoryInfo() can be
      defined in the "#else" section at the end of
      generic/tclThreadAlloc.c the same way
      TclFinalizeThreadAlloc() was done?
      
      The reason why I think this is wrong is really because I
      think the notion of TCL_MEM_DEBUG being mutually exclusive
      to TCL_THREADS/USE_THREAD_ALLOC is a mistake or
      misunderstanding when it was integrated into the Tcl core.  
      
      TCL_MEM_DEBUG was really meant to select behavior for
      Tcl_Alloc/Tcl_Free and friends, in generic/tclCkalloc.c if
      TCL_MEM_DEBUG is on, they use the debug allocator
      Tcl_DbCkalloc which wraps TclpAlloc else Tcl_Alloc uses
      TclpAlloc unwrapped and Tcl_Free uses TclpFree unwrapped, etc.
      
      USE_THREAD_ALLOC is the selector for the "zippy" allocator
      (generic/tclThreadAlloc.c) vs. using the normal Tcl
      allocator (generic/tclAlloc.c) allocator, implementing their
      own versions of TclpAlloc and TclpFree, etc.
      
      So, TCL_MEM_DEBUG is a wrapping around the Tclp{Alloc,Free}
      that's provided by EITHER tclThreadAlloc.c OR tclAlloc.c. 
      It's not INSTEAD of.
      
      Does this help make things clear why I think the
      configurations that we are building at AOL are legitimate
      configurations that, correctly, Tcl cannot validly produce
      (but were SUPPOSED to!)?
      
      -- Dossy
      
      
    2. login: "dossy"
    3. mimetype: "text/plain"
    4. username: "dossy"
  12. Ticket change [817f24979c] (rid 117047) by mistachkin on 2004-12-05 08:17:14:

    1. icomment:
      Logged In: YES 
      user_id=113501
      
      I have to agree with Dossy here.  
      
      The TCL_MEM_DEBUG flag should NOT be mutually exclusive 
      of the TCL_THREADS/USE_THREAD_ALLOC flags.  The fundamental
      question becomes "Then how do you debug the threaded memory
      allocator?"  This issue needs to be fixed some other way
      that doesn't break things.
      
      Also, this should be fixed prior to 8.4.9 and 8.5a2.
      
      
      
      
    2. login: "mistachkin"
    3. mimetype: "text/plain"
    4. priority changed to: "9 Immediate"
    5. resolution changed to: "None"
    6. status changed to: "Open"
    7. username: "mistachkin"
  13. Ticket change [16124355b0] (rid 124664) by hobbs on 2004-12-05 08:41:46:

    1. foundin changed to: "None"
    2. icomment:
      
      
      data_type - 360894
      
      Logged In: YES 
      user_id=72656
      
      This will not be fixed prior to either of those releases. 
      This is an enhancement to the build configuration, not a
      real bug in Tcl per se.
      
      
    3. login: "hobbs"
    4. mimetype: "text/plain"
    5. priority changed to: "6"
    6. subsystem changed to: "41. Memory Allocation"
    7. username: "hobbs"
  14. Ticket change [0e37ad01d0] (rid 94575) by dossy on 2004-12-05 09:09:13:

    1. icomment:
      Logged In: YES 
      user_id=21885
      
      To clarify:
      
      --disable-threads: use generic/tclAlloc.c
      
      --disable-threads, --enable-symbols=mem: use
      generic/tclCkalloc.c AND generic/tclAlloc.c
      
      --enable-threads: use generic/tclThreadAlloc.c
      
      --enable-threads, --enable-symbols=mem: use
      generic/tclCkalloc.c AND generic/tclThreadAlloc.c
      
      I can see where the "confusion" comes from because of the
      way the #ifdef's are laid out in generic/tclInt.h, with
      "#ifdef TCL_MEM_DEBUG ... #elif defined(TCL_THREADS) &&
      defined(USE_THREAD_ALLOC)" but there was a distinct
      difference in Tcl's behavior if built USE_THREAD_ALLOC with
      and without TCL_MEM_DEBUG ... until the patch applied to
      this bug was applied.
      
      The one configuration that's not possible using Tcl's
      "configure" script currently is the threaded-no-zippy Tcl
      build which we still build at AOL (for debugging purposes).
       Basically, it defines TCL_THREADS but not USE_THREAD_ALLOC
      -- you get a threaded Tcl build, but use the allocator from
      generic/tclAlloc.c instead of generic/tclThreadAlloc.c.  I
      can file this as a RFE/FRQ if necessary, but our internal
      builds at AOL can happily continue to use the "sed tricks"
      to produce this build if the Tcl core doesn't want to
      support it as a valid configuration.
      
      An interesting question for non-threaded Tcl builds would be
      to support USE_THREAD_ALLOC as a valid option -- for
      platforms running Tcl with plenty of memory, it should speed
      up Tcl_DString performance or other places where chunks of
      small memory are allocated and grown frequently.  Basically,
      TCL_THREAD is undefined but USE_THREAD_ALLOC is defined. 
      Not sure if Tcl would even build this way, but if it does,
      I'd be curious to see what the Tcl benchmarks have to say.
      
      Again, the correct thing to do is back out the change
      associated with the "fix" to this bug.
      
      To answer Joe's question, you debug the threaded (zippy)
      memory allocator with --enable-threads --enable-symbols=mem,
      and if that doesn't build on Win32 then we need to talk
      about why it doesn't build (what symbols are missing and
      then implement those as appropriate for Win32, etc.).
      
      
      
    2. login: "dossy"
    3. mimetype: "text/plain"
    4. username: "dossy"
  15. Ticket change [c2fbbde2ee] (rid 111580) by dossy on 2004-12-05 09:15:54:

    1. icomment:
      Logged In: YES 
      user_id=21885
      
      Jeff, I disagree.  The patch that was applied /introduces/ a
      bug, which breaks a previously valid configuration
      (TCL_MEM_DEBUG + USE_THREAD_ALLOC).  Therefore, it must be
      backed out.
      
      Looking at things, once this change is backed out, I think
      Joe's original reason for opening this bug will go away: a
      memory-debug threaded Tcl build on Win32 should work, just
      as it will on Solaris and Linux.
      
      The "feature request" part here is to be able to build an
      --enable-threads Tcl *without* USE_THREAD_ALLOC defined. 
      Fine -- I'll file that as a separate RFE.  However, the
      applied patch needs to be backed out to fix the
      --enable-threads --enable-symbols=mem build, which now
      currently does NOT do the right thing as it defines
      USE_THREAD_ALLOC (therefore generic/tclAlloc.c won't be
      used) and defines TCL_MEM_DEBUG (therefore
      generic/tclThreadAlloc.c won't be used).  Since those are
      the only two places where TclpAlloc() and TclpFree() are
      defined ... this breaks the build!
      
      I still say this is a bug, that was solely introduced by the
      application of the patch attached to this bug tracker item.
      
      
      
      
      
      
    2. login: "dossy"
    3. mimetype: "text/plain"
    4. username: "dossy"
  16. Ticket change [a953cd5a65] (rid 99133) by dossy on 2004-12-05 09:23:56:

    1. icomment:
      Logged In: YES 
      user_id=21885
      
      I just filed [RFE #1079199] for the non-zippy configuration:
      
      [ 1079199 ] Build a threaded Tcl without the "zippy" allocator.
      
      
      
    2. login: "dossy"
    3. mimetype: "text/plain"
    4. username: "dossy"
  17. Ticket change [67916f50b2] (rid 102911) by hobbs on 2004-12-07 03:13:57:

    1. closedate changed to: "2004-12-06T20:13:57"
    2. closer changed to: "hobbs"
    3. icomment:
      Logged In: YES 
      user_id=72656
      
      I am closing this as a dup to 1079199.  The statement about
      behavior of the configure is correct, except that it does
      build a "correct" build, as can be seen with this Linux
      build test:
      
      commodore [~/build/tcl84std] 201 > make shell
      % info patch
      8.4.9
      % head config.status
      #! /bin/sh
      # Generated automatically by configure.
      # Run this file to recreate the current configuration.
      # This directory was configured as follows,
      # on host commodore:
      #
      # /home/jeffh/cvs/tcl/tcl8.4/unix/configure 
      --prefix=/home/jeffh/install
      --exec-prefix=/home/jeffh/install/linux-x86_64
      --disable-shared --enable-threads --enable-symbols=mem
      #
      # Compiler output produced by configure, useful for debugging
      # configure, is in ./config.log if it exists.
      % set tcl_platform(threaded)
      1
      % 
      
      
    4. login: "hobbs"
    5. mimetype: "text/plain"
    6. resolution changed to: "Duplicate"
    7. status changed to: "Closed"
    8. username: "hobbs"