<?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 Re: Segmentation fault, dlopen ,aCC -AA -Ae in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/segmentation-fault-dlopen-acc-aa-ae/m-p/4484540#M680443</link>
    <description>thanks, i will try it.</description>
    <pubDate>Mon, 24 Aug 2009 09:51:21 GMT</pubDate>
    <dc:creator>ciwoo</dc:creator>
    <dc:date>2009-08-24T09:51:21Z</dc:date>
    <item>
      <title>Segmentation fault, dlopen ,aCC -AA -Ae</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/segmentation-fault-dlopen-acc-aa-ae/m-p/4484538#M680441</link>
      <description>machime platform：&lt;BR /&gt;ia64 HP-UX B.11.23&lt;BR /&gt;&lt;BR /&gt;problem：&lt;BR /&gt;when  program 'A' use dlopen function to load library 'B', program 'A' may crash&lt;BR /&gt;&lt;BR /&gt;scene description ：&lt;BR /&gt;program 'A' use dlopen to load dynamic  library "B', and "A" and "B"  is correct in syntax and &lt;BR /&gt;&lt;BR /&gt;logic,and 'A' is compiled by C language ,and 'B' is complied by C++ language&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;'A' compile parameter is：&lt;BR /&gt;aCC -o A.out -Ae -g +DD64 -mt -dynamic -ldl -lpthread&lt;BR /&gt;&lt;BR /&gt;'B' compile parameter is：&lt;BR /&gt;aCC -o B.so -AA -b -mt -Wl,+s -Wl,+vnocompatwarnings +DD64 +Olit=all -Wl,-hsqlca,+allowdups &lt;BR /&gt;&lt;BR /&gt;-w -lunwind -lCsup -lstd_v2&lt;BR /&gt;&lt;BR /&gt;'A" used (aCC -Ae)，"B" used (aCC-AA)&lt;BR /&gt;&lt;BR /&gt;print stack as below：&lt;BR /&gt;&lt;BR /&gt;Program terminated with signal 11, Segmentation fault.&lt;BR /&gt;SEGV_MAPERR - Address not mapped to object&lt;BR /&gt;   &lt;BR /&gt;#0  0xc0000000000e7560:0 in pthread_mutex_destroy+0xc0 ()&lt;BR /&gt;   from /usr/lib/hpux64/libpthread.so.1&lt;BR /&gt;(gdb) where&lt;BR /&gt;#0  0xc0000000000e7560:0 in pthread_mutex_destroy+0xc0 ()&lt;BR /&gt;   from /usr/lib/hpux64/libpthread.so.1&lt;BR /&gt;#1  0xc000000000357de0:0 in __thread_mutex_free+0xc0 ()&lt;BR /&gt;   from /usr/lib/hpux64/libc.so.1&lt;BR /&gt;#2  0xc00000000233f370:0 in _HPMutexWrapper::~_HPMutexWrapper()+0xd0 ()&lt;BR /&gt;   from /usr/lib/hpux64/libstd_v2.so.1&lt;BR /&gt;#3  0xc000000006eda1e0:0 in std::basic_streambuf&lt;CHAR&gt; &lt;BR /&gt;&lt;BR /&gt;&amp;gt;::~basic_streambuf () at EIClass.cpp:1&lt;BR /&gt;#4  0xc000000006eb6980:0 in &lt;BR /&gt;&lt;BR /&gt;std::basic_stringstream&lt;CHAR&gt;,std::allocator&lt;CHAR&gt; &lt;BR /&gt;&lt;BR /&gt;&amp;gt;::~basic_stringstream ()&lt;BR /&gt;    at /opt/aCC/include_std/sstream:74&lt;BR /&gt;#5  0xc000000006ec8690:0 in EIClass::GetColVal () at EIClass.cpp:1441   //-----------------------&amp;gt;  user &lt;BR /&gt;&lt;BR /&gt;function&lt;BR /&gt;&lt;BR /&gt;This problem  happened  in EIClass::GetColVal () return function，&lt;BR /&gt;snippet displayed  as below&lt;BR /&gt;&lt;BR /&gt;int EIClass::GetColVal (){&lt;BR /&gt;  &lt;BR /&gt; ...&lt;BR /&gt; ...&lt;BR /&gt;&lt;BR /&gt; return 0;   //-----------------------&amp;gt; coredump happen&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/CHAR&gt;&lt;/CHAR&gt;&lt;/CHAR&gt;</description>
      <pubDate>Mon, 24 Aug 2009 07:40:30 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/segmentation-fault-dlopen-acc-aa-ae/m-p/4484538#M680441</guid>
      <dc:creator>ciwoo</dc:creator>
      <dc:date>2009-08-24T07:40:30Z</dc:date>
    </item>
    <item>
      <title>Re: Segmentation fault, dlopen ,aCC -AA -Ae</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/segmentation-fault-dlopen-acc-aa-ae/m-p/4484539#M680442</link>
      <description>&lt;P&gt;&amp;gt;aCC -Ae -g +DD64 -mt -dynamic -ldl -lpthread&lt;BR /&gt;&lt;BR /&gt;You should NOT be using "aCC -Ae". Instead use cc. You don't need -lpthread since you have -mt. Also you shouldn't use -dynamic since it is the default.&lt;BR /&gt;&lt;BR /&gt;&amp;gt;aCC -AA -b -mt -Wl,+s -Wl,+vnocompatwarnings +DD64 +Olit=all -Wl,-hsqlca,+allowdups&lt;BR /&gt;&lt;BR /&gt;+Olit=all is the default, you don't need this.&lt;BR /&gt;-Wl,-hsqlca,+allowdups should be split into two ld options: -Wl,-hsqlca -Wl,+allowdups&lt;BR /&gt;Why do you have the latter? Any duplicates violate the ODR rule and are illegal.&lt;BR /&gt;&lt;BR /&gt;&amp;gt;-lunwind -lCsup -lstd_v2&lt;BR /&gt;&lt;BR /&gt;This is illegal and doesn't match what's documented for plugins.&lt;BR /&gt;&lt;A target="_blank" href="http://docs.hp.com/en/14487/distributing.htm#linking"&gt;http://docs.hp.com/en/14487/distributing.htm#linking&lt;/A&gt;&lt;BR /&gt;The order is: -lstd_v2 -lCsup -lunwind -lm&lt;BR /&gt;&lt;BR /&gt;This may be the cause. Also have you compiled everything with -mt?&lt;BR /&gt;&lt;BR /&gt;You shouldn't use -w but suppress individual warnings with +Wnnnn.&lt;/P&gt;</description>
      <pubDate>Mon, 22 Aug 2011 03:39:32 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/segmentation-fault-dlopen-acc-aa-ae/m-p/4484539#M680442</guid>
      <dc:creator>Dennis Handly</dc:creator>
      <dc:date>2011-08-22T03:39:32Z</dc:date>
    </item>
    <item>
      <title>Re: Segmentation fault, dlopen ,aCC -AA -Ae</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/segmentation-fault-dlopen-acc-aa-ae/m-p/4484540#M680443</link>
      <description>thanks, i will try it.</description>
      <pubDate>Mon, 24 Aug 2009 09:51:21 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/segmentation-fault-dlopen-acc-aa-ae/m-p/4484540#M680443</guid>
      <dc:creator>ciwoo</dc:creator>
      <dc:date>2009-08-24T09:51:21Z</dc:date>
    </item>
    <item>
      <title>Re: Segmentation fault, dlopen ,aCC -AA -Ae</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/segmentation-fault-dlopen-acc-aa-ae/m-p/4484541#M680444</link>
      <description>hello Dennis Handly:&lt;BR /&gt;I have a  question. &lt;BR /&gt;&lt;BR /&gt;Does it have any problem when a 'C'program  call 'C++' shared library with dlopen,&lt;BR /&gt;can you give me some suggestions or show me more relalted information, thank you very much.</description>
      <pubDate>Mon, 24 Aug 2009 10:28:11 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/segmentation-fault-dlopen-acc-aa-ae/m-p/4484541#M680444</guid>
      <dc:creator>ciwoo</dc:creator>
      <dc:date>2009-08-24T10:28:11Z</dc:date>
    </item>
    <item>
      <title>Re: Segmentation fault, dlopen ,aCC -AA -Ae</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/segmentation-fault-dlopen-acc-aa-ae/m-p/4484542#M680445</link>
      <description>&amp;gt;Does it have any problem when a C program call aC++ shared library with dlopen, can you give me some suggestions or show me more related information.&lt;BR /&gt;&lt;BR /&gt;It shouldn't.  The URL I provided above shows how to link an aC++ shlib for a plugin.</description>
      <pubDate>Tue, 25 Aug 2009 01:49:40 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/segmentation-fault-dlopen-acc-aa-ae/m-p/4484542#M680445</guid>
      <dc:creator>Dennis Handly</dc:creator>
      <dc:date>2009-08-25T01:49:40Z</dc:date>
    </item>
  </channel>
</rss>

