Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 11 Jun 1999 01:35:37 -0700 (PDT)
From:      pavel_roskin@geocities.com
To:        freebsd-gnats-submit@freebsd.org
Subject:   bin/12129: Process cannot call external functions after dlclose(self)
Message-ID:  <19990611083537.11F2F14EF0@hub.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         12129
>Category:       bin
>Synopsis:       Process cannot call external functions after dlclose(self)
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Fri Jun 11 01:40:01 PDT 1999
>Closed-Date:
>Last-Modified:
>Originator:     Pavel Roskin
>Release:        3.2-RELEASE
>Organization:
Contex Ltd., Saint Petersburg, Russia
>Environment:
FreeBSD liverpool.typhoon.spb.ru 3.2-RELEASE FreeBSD 3.2-RELEASE #0: Tue May 18
04:05:08 GMT 1999     jkh@cathair:/usr/src/sys/compile/GENERIC  i386
>Description:
Executable compiled with -Wl,--export-dynamic can call dlopen(0,RTLD_LAZY)
and access its own symbols. However, dlclose(handle) where handle is
returned by that dlopen() makes the process behave incorrectly.
Notably, the process cannot call external functions anymore,
not even exit().
>How-To-Repeat:
#include <dlfcn.h>
#include <stdio.h>

int
main ()
{
>Fix:
  void* handle;
  handle = dlopen(0, RTLD_LAZY);
  dlclose(handle);
  return 0;
}
Or just run "make check" in ftp://ftp.gnu.org/pub/gnu/libtool/libtool-1.3.2.tar.gz

>Release-Note:
>Audit-Trail:
>Unformatted:


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-bugs" in the body of the message




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