Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 13 Jan 2015 04:23:47 +0000
From:      bugzilla-noreply@freebsd.org
To:        freebsd-ports-bugs@FreeBSD.org
Subject:   [Bug 196668] sysutils/logrotate: segmentation fault due to differences in qsort_r implementations
Message-ID:  <bug-196668-13@https.bugs.freebsd.org/bugzilla/>

next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=196668

            Bug ID: 196668
           Summary: sysutils/logrotate: segmentation fault due to
                    differences in qsort_r implementations
           Product: Ports & Packages
           Version: Latest
          Hardware: amd64
                OS: Any
            Status: New
          Severity: Affects Only Me
          Priority: ---
         Component: Individual Port(s)
          Assignee: freebsd-ports-bugs@FreeBSD.org
          Reporter: jyoung15@gmail.com
                CC: js@iksz.hu
             Flags: maintainer-feedback?(js@iksz.hu)
                CC: js@iksz.hu

sysutils/logrotate 3.8.8 causes a segmentation fault.  SVN r450 upstream
introduced sortGlobResult, which uses qsort_r.  Linux and FreeBSD have
different implementations of this function:

Linux:
     void qsort_r(void *base, size_t nmemb, size_t size,
                  int (*compar)(const void *, const void *, void *),
                  void *arg);
FreeBSD:
     void qsort_r(void *base, size_t nmemb, size_t size, void *thunk,
                  int (*compar)(void *, const void *, const void *));


Note differences in location of thunk/arg and compar function pointer. Proposed
patch attached.

--- Comment #1 from Bugzilla Automation <bugzilla@FreeBSD.org> ---
Maintainer CC'd

-- 
You are receiving this mail because:
You are the assignee for the bug.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-196668-13>