bug-libtool
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: ltdl bugs


From: Ralf Wildenhues
Subject: Re: ltdl bugs
Date: Sun, 3 Apr 2005 15:54:19 +0200
User-agent: Mutt/1.4.1i

* Jeff Squyres wrote on Sun, Apr 03, 2005 at 03:19:33PM CEST:
> 
> Here's a better (full) patch, featuring:
> 
> - remove redundant logic
> - re-indent the rest of the function
> - use ltdl's indenting style

Heh.

> - add a few comments
> - lower carbs
> 
> +      if (!LT_DLIS_RESIDENT (handle))
> +        {
> +          lt_user_data data = handle->loader->dlloader_data;
> +          errors += handle->loader->module_close (data, 
> handle->module);
> +          errors += unload_deplibs(handle);
> +
> +          /* It is up to the callers to free the data itself.  */
> +          LT_DLFREE (handle->caller_data);
> +
> +          LT_DLFREE (handle->info.filename);
> +          LT_DLFREE (handle->info.name);
> +        }
> +      /* Regardless of whether the module was resident or not, free
> +         the handle */
>        LT_DLFREE (handle);
> 
>        goto done;
> -----
> 
> The patch looks longer than it really is simply because of the 
> re-indentation.  All it does is cordon off the section where the module 
> is unloaded (etc.) to be only for the !RESIDENT case.  Removing the 
> handle from the list of handles and then freeing the handle occurs 
> regardless of whether the module is resident or not.

It's not ok, because it does not free caller_data, info.filename,
info.name.  This might just not show up in OpenMPI.

I tried moving the three LT_DLFREE after the brace, and it /seems/ ok
then.  Am quite reluctant to put it in yet, because I fear to have
overlooked something.

Regards,
Ralf




reply via email to

[Prev in Thread] Current Thread [Next in Thread]