<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Problems with unloading a dynamically loaded library in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/problems-with-unloading-a-dynamically-loaded-library/m-p/3501432#M846233</link>
    <description>I am writing a program on HP-UX 11.11 which does the following:&lt;BR /&gt;&lt;BR /&gt;a) dynamically load the library, and get the various function pointers&lt;BR /&gt;b) invoke some of the functions&lt;BR /&gt;c) unload the library&lt;BR /&gt; &lt;BR /&gt;Somehow i can run throught this once, but the second time the program coredumps. At the time of coredump, one of the functions in the dynamically loaded library got into a recursion loop and out-ran the program stack size.&lt;BR /&gt;&lt;BR /&gt;Another developer who had experience with dynamic loading says that some unix do not like the unload part.&lt;BR /&gt;&lt;BR /&gt;Furthermore, the unload would unload the whole library, no matter how many 'load' was done, or whether the library was loaded dynamically or not.&lt;BR /&gt;&lt;BR /&gt; The program is written in C++ but calls into a C library by dynamically loading it.&lt;BR /&gt;&lt;BR /&gt;For timebeing, i commented out the unload part, but that is not a permanent solution. Are there any issues like this known on HP-UX?</description>
    <pubDate>Wed, 09 Mar 2005 18:15:04 GMT</pubDate>
    <dc:creator>Ramesh Thummalapenta_1</dc:creator>
    <dc:date>2005-03-09T18:15:04Z</dc:date>
    <item>
      <title>Problems with unloading a dynamically loaded library</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/problems-with-unloading-a-dynamically-loaded-library/m-p/3501432#M846233</link>
      <description>I am writing a program on HP-UX 11.11 which does the following:&lt;BR /&gt;&lt;BR /&gt;a) dynamically load the library, and get the various function pointers&lt;BR /&gt;b) invoke some of the functions&lt;BR /&gt;c) unload the library&lt;BR /&gt; &lt;BR /&gt;Somehow i can run throught this once, but the second time the program coredumps. At the time of coredump, one of the functions in the dynamically loaded library got into a recursion loop and out-ran the program stack size.&lt;BR /&gt;&lt;BR /&gt;Another developer who had experience with dynamic loading says that some unix do not like the unload part.&lt;BR /&gt;&lt;BR /&gt;Furthermore, the unload would unload the whole library, no matter how many 'load' was done, or whether the library was loaded dynamically or not.&lt;BR /&gt;&lt;BR /&gt; The program is written in C++ but calls into a C library by dynamically loading it.&lt;BR /&gt;&lt;BR /&gt;For timebeing, i commented out the unload part, but that is not a permanent solution. Are there any issues like this known on HP-UX?</description>
      <pubDate>Wed, 09 Mar 2005 18:15:04 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/problems-with-unloading-a-dynamically-loaded-library/m-p/3501432#M846233</guid>
      <dc:creator>Ramesh Thummalapenta_1</dc:creator>
      <dc:date>2005-03-09T18:15:04Z</dc:date>
    </item>
    <item>
      <title>Re: Problems with unloading a dynamically loaded library</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/problems-with-unloading-a-dynamically-loaded-library/m-p/3501433#M846234</link>
      <description>Are you using dlopen/dlclose or shl_load/shl_unload?&lt;BR /&gt;&lt;BR /&gt;Are you compiling 32-bit or 64-bit?&lt;BR /&gt;&lt;BR /&gt;The same shared library can be opened multiple times.  &lt;BR /&gt;&lt;BR /&gt;On PA32, shl_unload unloads the shared library regardless of whether there are other references to it through other load invocations or through implicit references from other shared libraries.  No reference count is kept.  &lt;BR /&gt;&lt;BR /&gt;On PA64, a reference counter is kept for each loaded shared library, like the behavior of dlopen(3c) and dlclose(3c).  shl_unload does not remove the shared library from the address space until all references to that shared library have been removed.&lt;BR /&gt;</description>
      <pubDate>Thu, 10 Mar 2005 04:29:41 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/problems-with-unloading-a-dynamically-loaded-library/m-p/3501433#M846234</guid>
      <dc:creator>Stephen Keane</dc:creator>
      <dc:date>2005-03-10T04:29:41Z</dc:date>
    </item>
    <item>
      <title>Re: Problems with unloading a dynamically loaded library</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/problems-with-unloading-a-dynamically-loaded-library/m-p/3501434#M846235</link>
      <description>It looks like this 32-bit behaviour is the reason for our issue. We have avoided the unloading and the program works fine now.</description>
      <pubDate>Thu, 10 Mar 2005 16:08:14 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/problems-with-unloading-a-dynamically-loaded-library/m-p/3501434#M846235</guid>
      <dc:creator>Ramesh Thummalapenta_1</dc:creator>
      <dc:date>2005-03-10T16:08:14Z</dc:date>
    </item>
  </channel>
</rss>

