public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* Segmentation fault on malloc call
@ 1999-09-29 13:48 Nawin Somyat
  1999-09-30  1:26 ` Casper H.S. Dik - Network Security Engineer
                   ` (3 more replies)
  0 siblings, 4 replies; 12+ messages in thread
From: Nawin Somyat @ 1999-09-29 13:48 UTC (permalink / raw)
  To: help-gcc

I'm tring to test memory allocation on my system and get SIGSEGV with
the
following (extracted) code

.....
SYM_ENTRY* entry;

if ((entry = malloc(sizeof(SYM_ENTRY)) == NULL)
  return (NULL);
.....

where SYM_ENTRY is a pointer.

When I do a loop on this code, only after a few loops, the program gives
me
SIGSEGV. This fault is reproducible after the same number of loops.

I tried to debug on gdb and get to the point where it told me that the
SIGSEGV is
from  _malloc_unlocked ().

Can anyone give me where I should check out next?

My system is Solaris 2.5 on UltraSparc I using gcc version 2.7.2.3.
I also tried the same program on Solaris 2.5.1 with the same version of
gcc
and it gave me the same result. I use the malloc function that comes
with
Sun library.

Thank you

Nawin

If possible, could you reply to my email address "snawin@engr.tu.ac.th"

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~1999-10-01  0:00 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1999-09-29 13:48 Segmentation fault on malloc call Nawin Somyat
1999-09-30  1:26 ` Casper H.S. Dik - Network Security Engineer
1999-09-30 23:56   ` Casper H.S. Dik - Network Security Engineer
1999-10-01  0:00   ` Casper H.S. Dik - Network Security Engineer
1999-09-30  6:03 ` Kenneth C Stahl
1999-09-30  6:12   ` Alan Stange
1999-09-30 23:56     ` Alan Stange
1999-10-01  0:00     ` Alan Stange
1999-09-30 23:56   ` Kenneth C Stahl
1999-10-01  0:00   ` Kenneth C Stahl
1999-09-30 23:56 ` Nawin Somyat
1999-10-01  0:00 ` Nawin Somyat

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).