logrotate seems to use qsort_r which is not standardized and has a different argument order on glibc and freebsd. This causes the program to crash when this code is executed. logrotate.c: In function ‘sortGlobResult’: logrotate.c:149:2: warning: passing argument 5 of ‘qsort_r’ from incompatible pointer type [enabled by default] qsort_r(result->gl_pathv, result->gl_pathc, sizeof(char *), compGlobResult, &d); ^ In file included from logrotate.c:13:0: /usr/include/stdlib.h:284:7: note: expected ‘int (*)(void *, const void *, const void *)’ but argument is of type ‘struct compData *’ void qsort_r(void *, size_t, size_t, void *, ^ Reproducible: Always Steps to Reproduce: 1. Have logs that needs rotating 2. logrotate /etc/logrotate.conf Actual Results: pid 78632 (logrotate), uid 250: exited on signal 11 Expected Results: My logs are rotated
Created attachment 395866 [details, diff] backported patch from svn Unlike the patch suggested by the freebsd bugzilla, I propose this change which is a backported version of commit 468 in the logrotate svn.
This issue has been resolved in app-admin/logrotate-3.8.9
Version no longer in the tree. Closing