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

Bug#571102: libc6: dlclose crashes on amd64



On Tue, Feb 23, 2010 at 02:54:14PM +0100, M G Berberich wrote:
> Package: libc6
> Version: 2.7-18lenny2
> Severity: normal
> 
> 
> repeatedly opening and closing a dynamic libarry on amd64 with
> dlopen/dlclose leads to a Segmentation fault on dlclose and wrecks the
> stack. Perhaps the internal counter gets confused.
> 
> This only occurs on amd64 not on x86.
> 
> Example-code is attached.
> 

In your example code, you are try to close an already closed handle, 
that's what causing the segfault. You can open the same library 
multiple time, but then only close each handle once.

Also opening the same library multiple time may return you the same
handle, but it is not something guaranteed. You should use a different
handle for each call to dlopen.

-- 
Aurelien Jarno	                        GPG: 1024D/F1BCDB73
aurelien@aurel32.net                 http://www.aurel32.net



Reply to: