HPE GreenLake Administration
- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- SEGV_ACCERR - Invalid Permissions for object
Operating System - HP-UX
1833723
Members
3596
Online
110063
Solutions
Forums
Categories
Company
Local Language
back
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
back
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
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Topic Options
- 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
08-04-2009 03:30 AM
08-04-2009 03:30 AM
SEGV_ACCERR - Invalid Permissions for object
Hi,
i have this small code:
std::string getStartTime()
{
std::fstream fstrm;
std::string temp="";
return temp;
}
main()
{
std::string lastT;
lastT = getStartTime();
}
i compiled it with:
g++ -ggdb -mlp64 -lunwind testprog.cpp
when i debug it crashes at line:
"std::string temp="";" with the following error
si_code: 2 - SEGV_ACCERR - Invalid Permissions for object.
this is what i get:
Program received signal SIGSEGV, Segmentation fault
si_code: 2 - SEGV_ACCERR - Invalid Permissions for object.
std::basic_string,std::allocator >::basic_string (__a=@0x9ffffffffffff350) at basic_string.h:252
warning: Source file is more recent than library libstdc++.so.6.
252 : _Alloc(__a), _M_p(__dat) { }
(gdb) bt
#0 std::basic_string,std::allocator >::basic_string (__a=@0x9ffffffffffff350) at basic_string.h:252
#1 0x4000000000001200:0 in getStartTime () at testprog.cpp:8
#2 0x4000000000001350:0 in main () at testprog.cpp:17
this happens only when i create an object of std::fstream in function "getStartTime". if I dont create this object everything works fine.
uname -a gives this:
HP-UX jaws B.11.23 U ia64 0420832424 unlimited-user license
I have no idea whats going on. Can someone help me please?
Thanks.
i have this small code:
std::string getStartTime()
{
std::fstream fstrm;
std::string temp="";
return temp;
}
main()
{
std::string lastT;
lastT = getStartTime();
}
i compiled it with:
g++ -ggdb -mlp64 -lunwind testprog.cpp
when i debug it crashes at line:
"std::string temp="";" with the following error
si_code: 2 - SEGV_ACCERR - Invalid Permissions for object.
this is what i get:
Program received signal SIGSEGV, Segmentation fault
si_code: 2 - SEGV_ACCERR - Invalid Permissions for object.
std::basic_string
warning: Source file is more recent than library libstdc++.so.6.
252 : _Alloc(__a), _M_p(__dat) { }
(gdb) bt
#0 std::basic_string
#1 0x4000000000001200:0 in getStartTime () at testprog.cpp:8
#2 0x4000000000001350:0 in main () at testprog.cpp:17
this happens only when i create an object of std::fstream in function "getStartTime". if I dont create this object everything works fine.
uname -a gives this:
HP-UX jaws B.11.23 U ia64 0420832424 unlimited-user license
I have no idea whats going on. Can someone help me please?
Thanks.
3 REPLIES 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-04-2009 08:32 AM
08-04-2009 08:32 AM
Re: SEGV_ACCERR - Invalid Permissions for object
What version of g++ are you using? Where did you get it?
If you have the latest from DSPP, 4.4.0-1:
http://www.hp.com/go/gcc
it mentions: gcc-help@cup.hp.com
Unless you have very large stack frames, I don't think you have a stack overflow.
Note: There is no need to initialize the string, try: std::string temp;
If you have the latest from DSPP, 4.4.0-1:
http://www.hp.com/go/gcc
it mentions: gcc-help@cup.hp.com
Unless you have very large stack frames, I don't think you have a stack overflow.
Note: There is no need to initialize the string, try: std::string temp;
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-04-2009 10:08 AM
08-04-2009 10:08 AM
Re: SEGV_ACCERR - Invalid Permissions for object
its 4.3 or 4.4 probably, its my office server so i can confirm day after tomorrow as tomorrow is a holiday.
secondly, the initialization is deliberate to show its crashing because when i later change the string i have to do that anyway. If we see the code its a very small code but still its crashing.
i have been programming since many years but never seen this kind of thing. The interesting part is when i do this:
std::string getStartTime()
{
std::string temp="";
return temp;
}
it works fine!!!! :(
secondly, the initialization is deliberate to show its crashing because when i later change the string i have to do that anyway. If we see the code its a very small code but still its crashing.
i have been programming since many years but never seen this kind of thing. The interesting part is when i do this:
std::string getStartTime()
{
std::string temp="";
return temp;
}
it works fine!!!! :(
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-04-2009 02:06 PM
08-04-2009 02:06 PM
Re: SEGV_ACCERR - Invalid Permissions for object
I have no problems with 4.2.1 and 4.4.0.
I'm not sure if this would make a difference:
std::string temp("");
I'm not sure if this would make a difference:
std::string temp("");
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
Company
Events and news
Customer resources
© Copyright 2025 Hewlett Packard Enterprise Development LP