Manifest of check-in
[1773409c76]
- Fix [1967630fff]: tclLoadDl.c dlerror() is not thread safe. On NetBSD and OpenBSD the dlerror() state is process-wide, so a failing [load] in one thread could get the error message of another thread, or NULL, which crashed in Tcl_ObjPrintf(). Hold a mutex from dlopen()/dlsym() until the matching dlerror() has been read, and use "unknown" if dlerror() returns NULL. Based on the patch by George Peter Staplin attached to the ticket.
by
serhiy.storchaka on
2026-10-25 09:50:17.
B d6dd6d0f71d00a6a69879c9963973d9ca9b532a6188cc7a8ddabe6df42ffff67
C Fix\s[1967630fff]:\stclLoadDl.c\sdlerror()\sis\snot\sthread\ssafe.\sOn\sNetBSD\sand\sOpenBSD\sthe\sdlerror()\sstate\sis\sprocess-wide,\sso\sa\sfailing\s[load]\sin\sone\sthread\scould\sget\sthe\serror\smessage\sof\sanother\sthread,\sor\sNULL,\swhich\scrashed\sin\sTcl_ObjPrintf().\sHold\sa\smutex\sfrom\sdlopen()/dlsym()\suntil\sthe\smatching\sdlerror()\shas\sbeen\sread,\sand\suse\s"unknown"\sif\sdlerror()\sreturns\sNULL.\sBased\son\sthe\spatch\sby\sGeorge\sPeter\sStaplin\sattached\sto\sthe\sticket.
D 2026-10-25T09:50:17.433
F unix/tclLoadDl.c e2834871375e5fdc23acab14b2e7115463a951304b833561e54b6d539cfe71be
P d6dd6d0f71d00a6a69879c9963973d9ca9b532a6188cc7a8ddabe6df42ffff67
R a6a40047374ca9250448cc212d51b63e
T *branch * unix-dlerror-mutex
T *sym-unix-dlerror-mutex *
T -sym-main *
T -sym-trunk *
U serhiy.storchaka
Z a5463144d74d6c0a8ed2f18f9fd8a4ad