HPE GreenLake Administration
- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: malloc problem
Operating System - HP-UX
1834007
Members
1804
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
04-12-2007 08:44 PM
04-12-2007 08:44 PM
malloc problem
I have a program with a promblem in malloc
My program generate core file
My system is
uname -a
HP-UX devscp1 B.10.20 U 9000/800 1815659472 unlimited-user license
Gdb say
ore was generated by `INAPB.exe'.
Program terminated with signal 11, Segmentation fault.
warning: The shared libraries were not privately mapped; setting a
breakpoint in a shared library will not work until you rerun the program.
#0 0xc009e28c in malloc () from /usr/lib/libc.1
(gdb) bt
#0 0xc009e28c in malloc () from /usr/lib/libc.1
#1 0x10d344 in libSockAllocWrQ (wrQLen=10000) at Sock_socket.c:969
..........
Sock_socket.c:969 like this
964 static SOCK_WrQType *libSockAllocWrQ(int wrQLen)
965 {
966 SOCK_WrQType *wrQPtr;
967 char **wrPool;
968
969 if(!(wrPool = (char **)malloc((wrQLen + 1) * sizeof(char *))))
970 return(NULL);
(gdb) print wrQLen
$1 = 10000
Do I need some patch with libc.1 ?
My program generate core file
My system is
uname -a
HP-UX devscp1 B.10.20 U 9000/800 1815659472 unlimited-user license
Gdb say
ore was generated by `INAPB.exe'.
Program terminated with signal 11, Segmentation fault.
warning: The shared libraries were not privately mapped; setting a
breakpoint in a shared library will not work until you rerun the program.
#0 0xc009e28c in malloc () from /usr/lib/libc.1
(gdb) bt
#0 0xc009e28c in malloc () from /usr/lib/libc.1
#1 0x10d344 in libSockAllocWrQ (wrQLen=10000) at Sock_socket.c:969
..........
Sock_socket.c:969 like this
964 static SOCK_WrQType *libSockAllocWrQ(int wrQLen)
965 {
966 SOCK_WrQType *wrQPtr;
967 char **wrPool;
968
969 if(!(wrPool = (char **)malloc((wrQLen + 1) * sizeof(char *))))
970 return(NULL);
(gdb) print wrQLen
$1 = 10000
Do I need some patch with libc.1 ?
2 REPLIES 2
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-12-2007 09:16 PM
04-12-2007 09:16 PM
Re: malloc problem
Hi
This is typically a corruption caused by your code. Usually a buffer overflow.
This is typically a corruption caused by your code. Usually a buffer overflow.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-13-2007 06:49 AM
04-13-2007 06:49 AM
Re: malloc problem
>Laurent: This is typically a corruption caused by your code.
Exactly.
If this could be run on 11.1, you could try gdb's heap checking commands.
Exactly.
If this could be run on 11.1, you could try gdb's heap checking commands.
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