- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Core Dumped while linking with -lpthread & works i...
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-02-2005 11:32 PM
05-02-2005 11:32 PM
Core Dumped while linking with -lpthread & works if -lpthread is removed
At the same time it is working fine without linking with -lpthread option.
*******************************************
///sample program test.cpp
#include
#include
#include
using namespace std;
long givelong();
int main()
{
long n=98l;
string testrw("MyFile");
ofstream fp_;
fp_.open(testrw.data());
const string s="TEST1";
fp_ << s <<" ---" <
fp_ << testrw.data() << n << "Hello" << endl;
return 0;
}
long givelong(){
long ln=901l;
return ln;
}
==============================================
compilation option:
------------------
/opt/aCC/bin/aCC -c -DHPUX +W392,431,655,684,818,823 -w -Wl,+s +DAportable +ESnolit -g -I./ -AA -D_REENTRANT -g test.cpp
-o testRW.o
/opt/aCC/bin/aCC -DHPUX +W392,431,655,684,818,823 -w -Wl,+s +DAportable +ESnolit -g -I./ -AA -D_REENTRANT -o testRW.out
testRW.o -lpthread
==============================================
Core Dumped :
-----------
#0 0xc020c4b0 in kill+0x10 () from /usr/lib/libc.2
#1 0xc01a6c74 in raise+0x24 () from /usr/lib/libc.2
#2 0xc01e70e0 in abort_C+0x160 () from /usr/lib/libc.2
#3 0xc01e713c in abort+0x1c () from /usr/lib/libc.2
#4 0xc28c34f0 in std::terminate+0x38 () from /usr/lib/libCsup_v2.2
#5 0xc28c39b8 in ThrowException+0x74 () from /usr/lib/libCsup_v2.2
#6 0xc28c3f18 in __throw__FPvT1+0x14c () from /usr/lib/libCsup_v2.2
#7 0xc4e00674 in std::ios_base::setf+0x7c () from /usr/lib/libstd_v2.2
#8 0xc4e00118 in std::ios_base::Init::Init+0x1e40 () from /usr/lib/libstd_v2.2
#9 0x225f4 in std::__sinit_test_cpp+0x28 ()
from /u01/kla-tencor/klarity/test/./testRW.out
#10 0xc28c7200 in __mainHelper+0x40 () from /usr/lib/libCsup_v2.2
#11 0xc28c7534 in _main+0xec () from /usr/lib/libCsup_v2.2
**********************************************
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-02-2005 11:37 PM
05-02-2005 11:37 PM
Re: Core Dumped while linking with -lpthread & works if -lpthread is removed
Your sample program is not using any thread related functions?
There is a problem when you -lpthread on 11.23 with memory leak issues. Search in forums with 11.23 -lpthread keyword.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-03-2005 12:20 AM
05-03-2005 12:20 AM
Re: Core Dumped while linking with -lpthread & works if -lpthread is removed
We compile & run the above program in HP-UX 11i. Compiler Used: aCC A.03.45
Basically we're moving from aCC A.03.27 to A.03.45. We compiled our existing source code with A.03.45 and noticed that the ofstream object is not working. i.e all strings are written to the output file, but the long datavalues are not written to the output file.
So we tried the above test program. If we don't link the above program with pthread library, its working fine.
Since our original program which is a Pro*C++ application, which uses pthread, we tried the sample program also to link with pthread just to narrow down the problem.
Even though we don't use any of the pthread related items, why does the code dump core?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-17-2005 09:39 PM
05-17-2005 09:39 PM
Re: Core Dumped while linking with -lpthread & works if -lpthread is removed
Did you contact HP support about this?
Kind regards, Christian
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-22-2005 01:15 AM
05-22-2005 01:15 AM
Re: Core Dumped while linking with -lpthread & works if -lpthread is removed
cxx-dev@cxx.cup.hp.com
they surely have a solution to your problem
regards
Laurent