• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Problem with dlsym
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Problem with dlsym


  • Subject: Re: Problem with dlsym
  • From: "Jordan K. Hubbard" <email@hidden>
  • Date: Thu, 12 May 2005 14:49:25 -0700

We have been using the 'dlcompat' library on OSX for a while and it
worked great.  However, with Tiger 10.4, it appears that the dl
functions (eg: dlsym) are now built in.  Unfortunately, when we try to
find a non-existent symbol in one of our large shared libraries, it
now takes forever (instead of returning null fairly
quickly/immediately).  After about 20 minutes of 'working' on the
dlsym call, our program will return and say that it couldn't find the
symbol.  When we used dlcompat before, we didn't have this problem.
We have read the man page and tried all the different options that are
presented, but nothing seems to help.

And the answer is that this is a known bug ("rdar://problem/4057081  infinte loop in dlsym(RTLD_NEXT, ) when symbol not found.", JFYI for those with radar access).

According to the developer, it only happens when there are circular dependencies with libraries.  The work around is 1) remove the circular dependency, or 2) use dlsym(RTLD_DEFAULT, "xxx") instead of RTLD_NEXT.

- Jordan

--

Jordan K. Hubbard

Engineering Manager, BSD technology group

Apple Computer




 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: Problem with dlsym
      • From: "Alexey Proskuryakov" <email@hidden>
  • Prev by Date: Re: Patch to mount_nfs to make NFSMNT_RESVPORT default
  • Next by Date: Re: Patch to mount_nfs to make NFSMNT_RESVPORT default
  • Previous by thread: Re: Problem with dlsym
  • Next by thread: Re: Problem with dlsym
  • Index(es):
    • Date
    • Thread