Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 2 Aug 1997 09:37:29 -0700 (PDT)
From:      livio@csl.sri.com
To:        freebsd-gnats-submit@FreeBSD.ORG
Subject:   bin/4216: dlsym returns null
Message-ID:  <199708021637.JAA00709@hub.freebsd.org>
Resent-Message-ID: <199708021640.JAA00801@hub.freebsd.org>

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

>Number:         4216
>Category:       bin
>Synopsis:       dlsym returns null
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          open
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sat Aug  2 09:40:01 PDT 1997
>Last-Modified:
>Originator:     livio ricciulli
>Organization:
sri International
>Release:        2.2-970422-RELENG2.2-970422-RELENG
>Environment:
FreeBSD hyacinth.csl.sri.com 2.2-970422-RELENG FreeBSD 2.2-970422-RELENG #0: Thu Apr 24 14:29:18 PDT 1997     gilham@hyacinth.csl.sri.com:/usr/src/sys/compile/HYACINTH  i386

>Description:
dlsym returns null pointer on FreeBSD system while exact same function works on both Linux and SunOs.

>How-To-Repeat:
here is the culprit..

spawn_thread(thread,path)
int thread;
char *path;
{
        char *error;

       threadtable[thread].handle = dlopen (path, 1);
        if (!threadtable[thread].handle) { fputs (dlerror(), stderr); exit(1); }
       printf("Spawning thread %d with entry point %s\n",thread,threadtable[thread].argv[0]);
       threadtable[thread].main_fun=dlsym(threadtable[thread].handle, threadtable[thread].argv[0]);
       if ((error = dlerror()) != NULL)  { fputs(error, stderr); exit(1); }
       threadtable[thread].main_fun(threadtable[thread].argc, threadtable[thread].argv);
}

>Fix:
I do not know why this does not work..
>Audit-Trail:
>Unformatted:



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