Re: Problem with DIGEST-MD5 (Cyrus-SASL v 2.1.18 on Mac OS X 10.3.3)

From: Alexey Melnikov (Alexey dot Melnikov at isode dot com)
Date: Mon May 17 2004 - 18:02:39 EDT

  • Next message: Igor Brezac: "Re: Problem with DIGEST-MD5 (Cyrus-SASL v 2.1.18 on Mac OS X 10.3.3)"

    robert delius royar wrote:

    > I can compile 2.1.18 without errors. (2.1.17 will not link on my
    > machine.)
    > However, unless I configure 2.1.18 with --disable-digest, I get a "bus
    > error" whenever a program accesses a library function in libsasl that
    > uses DIGEST (or whenever a program accesses the plugin, I suppose).
    > The error is triggered in the funtion 'digestmd5_common_mech_free' in
    > file plugins/digestmd5.c. Specifically, the instruction
    > 'utils->free(reauth_cache);' at line 1514. If I comment out this
    > line, the bus error goes away. It is replaced by the operating system
    > complaining that a memory segment has either been double freed, that a
    > segment has been freed that is inside a malloced area, or that a freed
    > segment has been changed after being freed.
    > I have tried various configurations, but the only one that works
    > includes (at least) --disable-digest.
    > I am not using Xcode. I use SASL to handle password negotiation
    > between sendmail client and sendmail server. The Mac is the client.
    > A FreeBSD server (also running SASL 2.1.18) is the server.
    > Since I cannot find any reference to this as a bug, I am assuming that
    > there is something different about my system that is triggering it. I
    > wonder whether there might be some #defines that are interfering with
    > the code for systems on Macs that are not compiling using Xcode or for
    > the Carbon interface? I note that 2.1.17 and some previous versions
    > will not compile with gcc3.3 on the Mac because the libtool script
    > fails. I have seen this often. Also, the 2.1.18 does not seem to
    > rely on libtool on the Mac or relies on it differently.

    My co-worker had the same problem on Mac.

    Basically the problem is that on Mac there are multiple links to the
    same plugin, all with .so suffix. This is different from the other Unix
    platforms, where they have different suffixes: .so, .so.2, .so.2.0.18.

    The end result is that dlopen.c is loading the same plugin multiple
    times (as it is looking for *.so). It seems that all different instances
    of the same plugin file share the data segment, so when different
    instances of the same plugin are destroyed, there is a double free. If
    reauth_cache variable is set to NULL in the DIGEST-MD5 destroy function,
    the problem will hopefully go away.


  • Next message: Igor Brezac: "Re: Problem with DIGEST-MD5 (Cyrus-SASL v 2.1.18 on Mac OS X 10.3.3)"

    Hosted Email Solutions

    Invaluement Anti-Spam DNSBLs

    Powered By FreeBSD   Powered By FreeBSD