HPE GreenLake Administration
- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- GCC 3.0.1/3.0.2 compiled program "memory fault" at...
Operating System - HP-UX
1834288
Members
2313
Online
110066
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
01-16-2002 08:16 AM
01-16-2002 08:16 AM
GCC 3.0.1/3.0.2 compiled program "memory fault" at run-time with STL...
Hi,
I've been up against a brick wall trying to port code that runs fine on Linux, Solaris and Win32 over to HP-UX. I've isolated the problem and have a very short example (attached).
When I build and run this sample program, depending on the value I provide for the _ARRAYLEN macro, I either get "Bus error", "Memory fault", or it runs successfully. Since the failure happens on entry to a sub-function, my first thought was "I've filled the stack."
The strange thing is this: values where it runs fine are both lower than AND higher than the values where it crashes. If I had filled the stack, higher values would fill the stack even more, so that theory is out the door.
I've installed the latest "stable" releases of GCC that I know of for HP-UX: 3.0.1 from the "HP-UX Porting and Archive Centre" mirror at U. Alberta, and later 3.0.2 from http://dsportal.eservices.hp.com/. I can also get this program to fail using STLport 4.5.1 (which is our STL of choice), just using different values, but I wanted to remove all the variables for this post.
Any ideas? Any help/hints/tips would be GREATLY appreciated. I noticed one post about ensuring the size of the swap on 11i is 4-times the physical memory size, but I've got 4GB or dev swap and 1GB of physical memory, so I think I'm okay there. This is (I hope) the last roadblock to a successful port to HP-UX. Thanks in advance.
Allan Stirrett.
I've been up against a brick wall trying to port code that runs fine on Linux, Solaris and Win32 over to HP-UX. I've isolated the problem and have a very short example (attached).
When I build and run this sample program, depending on the value I provide for the _ARRAYLEN macro, I either get "Bus error", "Memory fault", or it runs successfully. Since the failure happens on entry to a sub-function, my first thought was "I've filled the stack."
The strange thing is this: values where it runs fine are both lower than AND higher than the values where it crashes. If I had filled the stack, higher values would fill the stack even more, so that theory is out the door.
I've installed the latest "stable" releases of GCC that I know of for HP-UX: 3.0.1 from the "HP-UX Porting and Archive Centre" mirror at U. Alberta, and later 3.0.2 from http://dsportal.eservices.hp.com/. I can also get this program to fail using STLport 4.5.1 (which is our STL of choice), just using different values, but I wanted to remove all the variables for this post.
Any ideas? Any help/hints/tips would be GREATLY appreciated. I noticed one post about ensuring the size of the swap on 11i is 4-times the physical memory size, but I've got 4GB or dev swap and 1GB of physical memory, so I think I'm okay there. This is (I hope) the last roadblock to a successful port to HP-UX. Thanks in advance.
Allan Stirrett.
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