Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: ab8dfa8eec878f3c92da28de1f690f92f89e6916a1906c7143070738ccb387e1
Ticket: 815e2468064b4324bc4b303b9bafd3ef92803c32
tcl crash on channel thread transfer and fileevent writable in place
User & Date: sebres on 2018-06-11 11:42:08
Changes

  1. icomment:
    Branch fix-815e246806-8-6 is ready now for testing/review.
    
    This fix could theoretacally work without the new handling round abount channel ref-count (also non atomic), but... I'm not sure it works then in all possible constellations. In addition I would like to save this code to be pretty sure if someone calls this public API across two threads a bit other way (as in thread-module).
    
    And just to have atomic operations in tcl for future requirements (I've used it already for windows since I fixed pipes-error [8bd13f07bd], see [ad65e576ee]).
    
    Just this handling (atomic primitives in tclInt.h) is not complete possibly and may be missing for some older gcc/clang versions resp. some special platforms, that are don't have support for builtin atomic (or just miss some header include).<br/>
    If so, we should extend this on demand (similar way other projects doing this, e. g. we've this in nginx, see <a href="https://github.com/sebres/nginx/blob/hg-mirror/src/os/unix/ngx_atomic.h">ngx_atomic_fetch_add in ngx_atomic.h</a> for example.<br/>
    Or just to extend it with non-atomic variants of TclAtomicFetch... if totally unsupported.
    
    ATM tested MS-VC (>= 6.0), mingw (gcc >= 4.2), linux (gcc >= 6.2, clang >= 3.8).
    
  2. login: "sebres"
  3. mimetype: "text/x-fossil-wiki"