Path: utzoo!mnetor!uunet!lll-winken!lll-tis!ames!umd5!purdue!decwrl!labrea!csli!gandalf From: gandalf@csli.STANFORD.EDU (Juergen Wagner) Newsgroups: comp.unix.wizards Subject: Re: signal 10 in malloc call??? Message-ID: <3779@csli.STANFORD.EDU> Date: 6 May 88 01:34:12 GMT References: <3989@killer.UUCP> <640@vsi.UUCP> Reply-To: gandalf@csli.stanford.edu (Juergen Wagner) Organization: Center for the Study of Language and Information, Stanford U. Lines: 20 Keywords: sys V rel 3.1, died in malloc? The most likely source of strange effects like the ones you describe are some strcpy/strcat/scanf/fgets/... which write beyond the end of some string of chars. However, this does not necessarily have to be the cause of your problems. Consider also the following: o functions using up more arguments than provided, o functions called with a variable number of args but popping them with the wrong size. o scanf/sscanf reads double into floats. o some buffer isn't large enough. All this might not clobber the malloc area but the call stack, in which case you may detect that much later, and in an unexpected manner. Some time ago, somebody posted a malloc package with debugging aids, and I'll be glad to forward it to you. -- Juergen "Gandalf" Wagner, gandalf@csli.stanford.edu Center for the Study of Language and Information (CSLI), Stanford CA