• Gregory P. Smith's avatar
    Adds a sanity check to avoid a *very rare* infinite loop due to a corrupt tls · d868be88
    Gregory P. Smith yazdı
    key list data structure in the thread startup path.
    
    This change is a companion to r60148 which already successfully dealt with a
    similar issue on thread shutdown.
    
    In particular this loop has been observed happening from this call path:
     #0  in find_key ()
     #1  in PyThread_set_key_value ()
     #2  in _PyGILState_NoteThreadState ()
     #3  in PyThreadState_New ()
     #4  in t_bootstrap ()
     #5  in pthread_start_thread ()
    
    I don't know how this happens but it does, *very* rarely.  On more than
    one hardware platform.  I have not been able to reproduce it manually.
    (A flaky mutex implementation on the system in question is one hypothesis).
    
    As with r60148, the spinning we managed to observe in the wild was due to a
    single list element pointing back upon itself.
    d868be88
Adı
Son kayıt (commit)
Son güncelleme
Demo Loading commit data...
Doc Loading commit data...
Grammar Loading commit data...
Include Loading commit data...
Lib Loading commit data...
Mac Loading commit data...
Misc Loading commit data...
Modules Loading commit data...
Objects Loading commit data...
PC Loading commit data...
PCbuild Loading commit data...
Parser Loading commit data...
Python Loading commit data...
RISCOS Loading commit data...
Tools Loading commit data...
.bzrignore Loading commit data...
.hgignore Loading commit data...
.hgtags Loading commit data...
LICENSE Loading commit data...
Makefile.pre.in Loading commit data...
README Loading commit data...
configure Loading commit data...
configure.in Loading commit data...
install-sh Loading commit data...
pyconfig.h.in Loading commit data...
setup.py Loading commit data...