Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 0e37ad01d01235d3bfdec38609222fd1e811b9be
Ticket: 1030548fffffffffffffffffffffffffffffffff
Tcl 8.4 fails to build in debug/threaded config
User & Date: dossy on 2004-12-05 09:09:13
Changes

  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"