stdp = p = tbuf + sprintf(tbuf, "<%d>%.15s ", pri, ctime(&now) + 4); Sadly, the above line of syslog.c module is not thread-safe. ctime_r() shall be used. My application crashed in uClibc with a segfault (in asctime/memcpy) when one thread does libc_fork() while another thread uses vsyslog() even though vsyslog() is protected by a mutex by the application. I am compiling for ARM and configured uClibc for using LinuxThreads. I am using 0.9.30.1 but the bug seems to exist in all newer versions up to the latest library version (I looked at master branch and 0.9.33 via the source-code browsing website). The proposed solution is to replace the line by something like this: char time_str[26]; stdp = p = tbuf + sprintf(tbuf, "<%d>%.15s ", pri, ctime_r(&now, time_str) + 4); Cheers, crayor
I think this is fixed in the current stable release as well as on master. Please confirm.