diff options
| author | Jo-Philipp Wich <jow@openwrt.org> | 2015-10-08 02:10:22 +0200 |
|---|---|---|
| committer | Jo-Philipp Wich <jow@openwrt.org> | 2015-10-08 02:15:28 +0200 |
| commit | 926b68c15ded22a072e8223664b95ea83fec26bc (patch) | |
| tree | fb0c49a047b5bf4a016de6816ac181c9bc955e73 /lang/python | |
| parent | a8c37348b2363d747ad6fd6da7f3cf6037e315b2 (diff) | |
motion: fix segmentation fault under musl libc
During startup, motion calls pthread_getspecific() through motion_log()
before pthread_key_create() has been called yet. This works on glibc and
uclibc but segfaults on musl because motion is relying on undefined
behaviour here.
Move the pthread initialization before motion_startup() so that
tls_key_threadnr is initialized when motion_log() is called.
Also enforce the use of strerror_r() on musl by defining XSI_STRERROR_R
on all non-glibc systems because the supposed replacement code is broken
and crashes on musl.
References:
http://www.lavrsen.dk/foswiki/bin/view/Motion/BugReport2015x09x30x203633
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
Diffstat (limited to 'lang/python')
0 files changed, 0 insertions, 0 deletions
